summaryrefslogtreecommitdiffstats
path: root/src/cmd/compile/internal/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:19:13 +0000
commitccd992355df7192993c666236047820244914598 (patch)
treef00fea65147227b7743083c6148396f74cd66935 /src/cmd/compile/internal/test
parentInitial commit. (diff)
downloadgolang-1.21-ccd992355df7192993c666236047820244914598.tar.xz
golang-1.21-ccd992355df7192993c666236047820244914598.zip
Adding upstream version 1.21.8.upstream/1.21.8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cmd/compile/internal/test')
-rw-r--r--src/cmd/compile/internal/test/README4
-rw-r--r--src/cmd/compile/internal/test/abiutils_test.go399
-rw-r--r--src/cmd/compile/internal/test/abiutilsaux_test.go132
-rw-r--r--src/cmd/compile/internal/test/align_test.go96
-rw-r--r--src/cmd/compile/internal/test/bench_test.go124
-rw-r--r--src/cmd/compile/internal/test/clobberdead_test.go54
-rw-r--r--src/cmd/compile/internal/test/constFold_test.go18111
-rw-r--r--src/cmd/compile/internal/test/dep_test.go29
-rw-r--r--src/cmd/compile/internal/test/divconst_test.go325
-rw-r--r--src/cmd/compile/internal/test/fixedbugs_test.go86
-rw-r--r--src/cmd/compile/internal/test/float_test.go545
-rw-r--r--src/cmd/compile/internal/test/global_test.go106
-rw-r--r--src/cmd/compile/internal/test/iface_test.go126
-rw-r--r--src/cmd/compile/internal/test/inl_test.go396
-rw-r--r--src/cmd/compile/internal/test/inst_test.go60
-rw-r--r--src/cmd/compile/internal/test/intrinsics_test.go62
-rw-r--r--src/cmd/compile/internal/test/issue50182_test.go62
-rw-r--r--src/cmd/compile/internal/test/issue53888_test.go46
-rw-r--r--src/cmd/compile/internal/test/issue57434_test.go38
-rw-r--r--src/cmd/compile/internal/test/lang_test.go58
-rw-r--r--src/cmd/compile/internal/test/logic_test.go289
-rw-r--r--src/cmd/compile/internal/test/math_test.go167
-rw-r--r--src/cmd/compile/internal/test/memcombine_test.go199
-rw-r--r--src/cmd/compile/internal/test/mulconst_test.go242
-rw-r--r--src/cmd/compile/internal/test/pgo_devirtualize_test.go128
-rw-r--r--src/cmd/compile/internal/test/pgo_inl_test.go299
-rw-r--r--src/cmd/compile/internal/test/race.go64
-rw-r--r--src/cmd/compile/internal/test/reproduciblebuilds_test.go106
-rw-r--r--src/cmd/compile/internal/test/shift_test.go1152
-rw-r--r--src/cmd/compile/internal/test/ssa_test.go179
-rw-r--r--src/cmd/compile/internal/test/switch_test.go137
-rw-r--r--src/cmd/compile/internal/test/test.go1
-rw-r--r--src/cmd/compile/internal/test/testdata/addressed_test.go214
-rw-r--r--src/cmd/compile/internal/test/testdata/append_test.go61
-rw-r--r--src/cmd/compile/internal/test/testdata/arithBoundary_test.go694
-rw-r--r--src/cmd/compile/internal/test/testdata/arithConst_test.go9570
-rw-r--r--src/cmd/compile/internal/test/testdata/arith_test.go1498
-rw-r--r--src/cmd/compile/internal/test/testdata/array_test.go132
-rw-r--r--src/cmd/compile/internal/test/testdata/assert_test.go128
-rw-r--r--src/cmd/compile/internal/test/testdata/break_test.go250
-rw-r--r--src/cmd/compile/internal/test/testdata/chan_test.go63
-rw-r--r--src/cmd/compile/internal/test/testdata/closure_test.go32
-rw-r--r--src/cmd/compile/internal/test/testdata/cmpConst_test.go2209
-rw-r--r--src/cmd/compile/internal/test/testdata/cmp_test.go37
-rw-r--r--src/cmd/compile/internal/test/testdata/compound_test.go128
-rw-r--r--src/cmd/compile/internal/test/testdata/copy_test.go760
-rw-r--r--src/cmd/compile/internal/test/testdata/ctl_test.go150
-rw-r--r--src/cmd/compile/internal/test/testdata/deferNoReturn_test.go21
-rw-r--r--src/cmd/compile/internal/test/testdata/divbyzero_test.go48
-rw-r--r--src/cmd/compile/internal/test/testdata/dupLoad_test.go83
-rw-r--r--src/cmd/compile/internal/test/testdata/flowgraph_generator1.go315
-rw-r--r--src/cmd/compile/internal/test/testdata/fp_test.go1775
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go208
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/arithConstGen.go345
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go246
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/constFoldGen.go307
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/copyGen.go121
-rw-r--r--src/cmd/compile/internal/test/testdata/gen/zeroGen.go143
-rw-r--r--src/cmd/compile/internal/test/testdata/loadstore_test.go205
-rw-r--r--src/cmd/compile/internal/test/testdata/map_test.go37
-rw-r--r--src/cmd/compile/internal/test/testdata/mysort/mysort.go40
-rw-r--r--src/cmd/compile/internal/test/testdata/namedReturn_test.go93
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go73
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.pprofbin0 -> 699 bytes
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go29
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult/mult.go32
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.go90
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprofbin0 -> 943 bytes
-rw-r--r--src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot_test.go51
-rw-r--r--src/cmd/compile/internal/test/testdata/phi_test.go99
-rw-r--r--src/cmd/compile/internal/test/testdata/ptrsort.go30
-rw-r--r--src/cmd/compile/internal/test/testdata/ptrsort.out3
-rw-r--r--src/cmd/compile/internal/test/testdata/regalloc_test.go50
-rw-r--r--src/cmd/compile/internal/test/testdata/reproducible/issue20272.go34
-rw-r--r--src/cmd/compile/internal/test/testdata/reproducible/issue27013.go15
-rw-r--r--src/cmd/compile/internal/test/testdata/reproducible/issue30202.go17
-rw-r--r--src/cmd/compile/internal/test/testdata/reproducible/issue38068.go70
-rw-r--r--src/cmd/compile/internal/test/testdata/short_test.go57
-rw-r--r--src/cmd/compile/internal/test/testdata/slice_test.go46
-rw-r--r--src/cmd/compile/internal/test/testdata/sqrtConst_test.go50
-rw-r--r--src/cmd/compile/internal/test/testdata/string_test.go207
-rw-r--r--src/cmd/compile/internal/test/testdata/unsafe_test.go145
-rw-r--r--src/cmd/compile/internal/test/testdata/zero_test.go711
-rw-r--r--src/cmd/compile/internal/test/truncconst_test.go63
-rw-r--r--src/cmd/compile/internal/test/zerorange_test.go184
85 files changed, 45791 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/test/README b/src/cmd/compile/internal/test/README
new file mode 100644
index 0000000..242ff79
--- /dev/null
+++ b/src/cmd/compile/internal/test/README
@@ -0,0 +1,4 @@
+This directory holds small tests and benchmarks of code
+generated by the compiler. This code is not for importing,
+and the tests are intended to verify that specific optimzations
+are applied and correct.
diff --git a/src/cmd/compile/internal/test/abiutils_test.go b/src/cmd/compile/internal/test/abiutils_test.go
new file mode 100644
index 0000000..8ed7622
--- /dev/null
+++ b/src/cmd/compile/internal/test/abiutils_test.go
@@ -0,0 +1,399 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bufio"
+ "cmd/compile/internal/abi"
+ "cmd/compile/internal/base"
+ "cmd/compile/internal/ssagen"
+ "cmd/compile/internal/typecheck"
+ "cmd/compile/internal/types"
+ "cmd/internal/obj"
+ "cmd/internal/obj/x86"
+ "cmd/internal/src"
+ "fmt"
+ "os"
+ "testing"
+)
+
+// AMD64 registers available:
+// - integer: RAX, RBX, RCX, RDI, RSI, R8, R9, r10, R11
+// - floating point: X0 - X14
+var configAMD64 = abi.NewABIConfig(9, 15, 0)
+
+func TestMain(m *testing.M) {
+ ssagen.Arch.LinkArch = &x86.Linkamd64
+ ssagen.Arch.REGSP = x86.REGSP
+ ssagen.Arch.MAXWIDTH = 1 << 50
+ types.MaxWidth = ssagen.Arch.MAXWIDTH
+ base.Ctxt = obj.Linknew(ssagen.Arch.LinkArch)
+ base.Ctxt.DiagFunc = base.Errorf
+ base.Ctxt.DiagFlush = base.FlushErrors
+ base.Ctxt.Bso = bufio.NewWriter(os.Stdout)
+ types.LocalPkg = types.NewPkg("p", "local")
+ types.LocalPkg.Prefix = "p"
+ types.PtrSize = ssagen.Arch.LinkArch.PtrSize
+ types.RegSize = ssagen.Arch.LinkArch.RegSize
+ typecheck.InitUniverse()
+ os.Exit(m.Run())
+}
+
+func TestABIUtilsBasic1(t *testing.T) {
+
+ // func(x int32) int32
+ i32 := types.Types[types.TINT32]
+ ft := mkFuncType(nil, []*types.Type{i32}, []*types.Type{i32})
+
+ // expected results
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: int32
+ OUT 0: R{ I0 } spilloffset: -1 typ: int32
+ offsetToSpillArea: 0 spillAreaSize: 8
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsBasic2(t *testing.T) {
+ // func(p1 int8, p2 int16, p3 int32, p4 int64,
+ // p5 float32, p6 float32, p7 float64, p8 float64,
+ // p9 int8, p10 int16, p11 int32, p12 int64,
+ // p13 float32, p14 float32, p15 float64, p16 float64,
+ // p17 complex128, p18 complex128, p19 complex12, p20 complex128,
+ // p21 complex64, p22 int8, p23 in16, p24 int32, p25 int64,
+ // p26 int8, p27 in16, p28 int32, p29 int64)
+ // (r1 int32, r2 float64, r3 float64) {
+ i8 := types.Types[types.TINT8]
+ i16 := types.Types[types.TINT16]
+ i32 := types.Types[types.TINT32]
+ i64 := types.Types[types.TINT64]
+ f32 := types.Types[types.TFLOAT32]
+ f64 := types.Types[types.TFLOAT64]
+ c64 := types.Types[types.TCOMPLEX64]
+ c128 := types.Types[types.TCOMPLEX128]
+ ft := mkFuncType(nil,
+ []*types.Type{
+ i8, i16, i32, i64,
+ f32, f32, f64, f64,
+ i8, i16, i32, i64,
+ f32, f32, f64, f64,
+ c128, c128, c128, c128, c64,
+ i8, i16, i32, i64,
+ i8, i16, i32, i64},
+ []*types.Type{i32, f64, f64})
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: int8
+ IN 1: R{ I1 } spilloffset: 2 typ: int16
+ IN 2: R{ I2 } spilloffset: 4 typ: int32
+ IN 3: R{ I3 } spilloffset: 8 typ: int64
+ IN 4: R{ F0 } spilloffset: 16 typ: float32
+ IN 5: R{ F1 } spilloffset: 20 typ: float32
+ IN 6: R{ F2 } spilloffset: 24 typ: float64
+ IN 7: R{ F3 } spilloffset: 32 typ: float64
+ IN 8: R{ I4 } spilloffset: 40 typ: int8
+ IN 9: R{ I5 } spilloffset: 42 typ: int16
+ IN 10: R{ I6 } spilloffset: 44 typ: int32
+ IN 11: R{ I7 } spilloffset: 48 typ: int64
+ IN 12: R{ F4 } spilloffset: 56 typ: float32
+ IN 13: R{ F5 } spilloffset: 60 typ: float32
+ IN 14: R{ F6 } spilloffset: 64 typ: float64
+ IN 15: R{ F7 } spilloffset: 72 typ: float64
+ IN 16: R{ F8 F9 } spilloffset: 80 typ: complex128
+ IN 17: R{ F10 F11 } spilloffset: 96 typ: complex128
+ IN 18: R{ F12 F13 } spilloffset: 112 typ: complex128
+ IN 19: R{ } offset: 0 typ: complex128
+ IN 20: R{ } offset: 16 typ: complex64
+ IN 21: R{ I8 } spilloffset: 128 typ: int8
+ IN 22: R{ } offset: 24 typ: int16
+ IN 23: R{ } offset: 28 typ: int32
+ IN 24: R{ } offset: 32 typ: int64
+ IN 25: R{ } offset: 40 typ: int8
+ IN 26: R{ } offset: 42 typ: int16
+ IN 27: R{ } offset: 44 typ: int32
+ IN 28: R{ } offset: 48 typ: int64
+ OUT 0: R{ I0 } spilloffset: -1 typ: int32
+ OUT 1: R{ F0 } spilloffset: -1 typ: float64
+ OUT 2: R{ F1 } spilloffset: -1 typ: float64
+ offsetToSpillArea: 56 spillAreaSize: 136
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsArrays(t *testing.T) {
+ // func(p1 [1]int32, p2 [0]int32, p3 [1][1]int32, p4 [2]int32)
+ // (r1 [2]int32, r2 [1]int32, r3 [0]int32, r4 [1][1]int32) {
+ i32 := types.Types[types.TINT32]
+ ae := types.NewArray(i32, 0)
+ a1 := types.NewArray(i32, 1)
+ a2 := types.NewArray(i32, 2)
+ aa1 := types.NewArray(a1, 1)
+ ft := mkFuncType(nil, []*types.Type{a1, ae, aa1, a2},
+ []*types.Type{a2, a1, ae, aa1})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: [1]int32
+ IN 1: R{ } offset: 0 typ: [0]int32
+ IN 2: R{ I1 } spilloffset: 4 typ: [1][1]int32
+ IN 3: R{ } offset: 0 typ: [2]int32
+ OUT 0: R{ } offset: 8 typ: [2]int32
+ OUT 1: R{ I0 } spilloffset: -1 typ: [1]int32
+ OUT 2: R{ } offset: 16 typ: [0]int32
+ OUT 3: R{ I1 } spilloffset: -1 typ: [1][1]int32
+ offsetToSpillArea: 16 spillAreaSize: 8
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsStruct1(t *testing.T) {
+ // type s struct { f1 int8; f2 int8; f3 struct {}; f4 int8; f5 int16) }
+ // func(p1 int6, p2 s, p3 int64)
+ // (r1 s, r2 int8, r3 int32) {
+ i8 := types.Types[types.TINT8]
+ i16 := types.Types[types.TINT16]
+ i32 := types.Types[types.TINT32]
+ i64 := types.Types[types.TINT64]
+ s := mkstruct([]*types.Type{i8, i8, mkstruct([]*types.Type{}), i8, i16})
+ ft := mkFuncType(nil, []*types.Type{i8, s, i64},
+ []*types.Type{s, i8, i32})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: int8
+ IN 1: R{ I1 I2 I3 I4 } spilloffset: 2 typ: struct { int8; int8; struct {}; int8; int16 }
+ IN 2: R{ I5 } spilloffset: 8 typ: int64
+ OUT 0: R{ I0 I1 I2 I3 } spilloffset: -1 typ: struct { int8; int8; struct {}; int8; int16 }
+ OUT 1: R{ I4 } spilloffset: -1 typ: int8
+ OUT 2: R{ I5 } spilloffset: -1 typ: int32
+ offsetToSpillArea: 0 spillAreaSize: 16
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsStruct2(t *testing.T) {
+ // type s struct { f1 int64; f2 struct { } }
+ // type fs struct { f1 float64; f2 s; f3 struct { } }
+ // func(p1 s, p2 s, p3 fs)
+ // (r1 fs, r2 fs)
+ f64 := types.Types[types.TFLOAT64]
+ i64 := types.Types[types.TINT64]
+ s := mkstruct([]*types.Type{i64, mkstruct([]*types.Type{})})
+ fs := mkstruct([]*types.Type{f64, s, mkstruct([]*types.Type{})})
+ ft := mkFuncType(nil, []*types.Type{s, s, fs},
+ []*types.Type{fs, fs})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: struct { int64; struct {} }
+ IN 1: R{ I1 } spilloffset: 16 typ: struct { int64; struct {} }
+ IN 2: R{ F0 I2 } spilloffset: 32 typ: struct { float64; struct { int64; struct {} }; struct {} }
+ OUT 0: R{ F0 I0 } spilloffset: -1 typ: struct { float64; struct { int64; struct {} }; struct {} }
+ OUT 1: R{ F1 I1 } spilloffset: -1 typ: struct { float64; struct { int64; struct {} }; struct {} }
+ offsetToSpillArea: 0 spillAreaSize: 64
+`)
+
+ abitest(t, ft, exp)
+}
+
+// TestABIUtilsEmptyFieldAtEndOfStruct is testing to make sure
+// the abi code is doing the right thing for struct types that have
+// a trailing zero-sized field (where the we need to add padding).
+func TestABIUtilsEmptyFieldAtEndOfStruct(t *testing.T) {
+ // type s struct { f1 [2]int64; f2 struct { } }
+ // type s2 struct { f1 [3]int16; f2 struct { } }
+ // type fs struct { f1 float64; f s; f3 struct { } }
+ // func(p1 s, p2 s, p3 fs) (r1 fs, r2 fs)
+ f64 := types.Types[types.TFLOAT64]
+ i64 := types.Types[types.TINT64]
+ i16 := types.Types[types.TINT16]
+ tb := types.Types[types.TBOOL]
+ ab2 := types.NewArray(tb, 2)
+ a2 := types.NewArray(i64, 2)
+ a3 := types.NewArray(i16, 3)
+ s := mkstruct([]*types.Type{a2, mkstruct([]*types.Type{})})
+ s2 := mkstruct([]*types.Type{a3, mkstruct([]*types.Type{})})
+ fs := mkstruct([]*types.Type{f64, s, mkstruct([]*types.Type{})})
+ ft := mkFuncType(nil, []*types.Type{s, ab2, s2, fs, fs},
+ []*types.Type{fs, ab2, fs})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ } offset: 0 typ: struct { [2]int64; struct {} }
+ IN 1: R{ } offset: 24 typ: [2]bool
+ IN 2: R{ } offset: 26 typ: struct { [3]int16; struct {} }
+ IN 3: R{ } offset: 40 typ: struct { float64; struct { [2]int64; struct {} }; struct {} }
+ IN 4: R{ } offset: 80 typ: struct { float64; struct { [2]int64; struct {} }; struct {} }
+ OUT 0: R{ } offset: 120 typ: struct { float64; struct { [2]int64; struct {} }; struct {} }
+ OUT 1: R{ } offset: 160 typ: [2]bool
+ OUT 2: R{ } offset: 168 typ: struct { float64; struct { [2]int64; struct {} }; struct {} }
+ offsetToSpillArea: 208 spillAreaSize: 0
+`)
+
+ abitest(t, ft, exp)
+
+ // Check to make sure that NumParamRegs yields 2 and not 3
+ // for struct "s" (e.g. that it handles the padding properly).
+ nps := configAMD64.NumParamRegs(s)
+ if nps != 2 {
+ t.Errorf("NumParams(%v) returned %d expected %d\n",
+ s, nps, 2)
+ }
+}
+
+func TestABIUtilsSliceString(t *testing.T) {
+ // func(p1 []int32, p2 int8, p3 []int32, p4 int8, p5 string,
+ // p6 int64, p6 []intr32) (r1 string, r2 int64, r3 string, r4 []int32)
+ i32 := types.Types[types.TINT32]
+ sli32 := types.NewSlice(i32)
+ str := types.Types[types.TSTRING]
+ i8 := types.Types[types.TINT8]
+ i64 := types.Types[types.TINT64]
+ ft := mkFuncType(nil, []*types.Type{sli32, i8, sli32, i8, str, i8, i64, sli32},
+ []*types.Type{str, i64, str, sli32})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 I1 I2 } spilloffset: 0 typ: []int32
+ IN 1: R{ I3 } spilloffset: 24 typ: int8
+ IN 2: R{ I4 I5 I6 } spilloffset: 32 typ: []int32
+ IN 3: R{ I7 } spilloffset: 56 typ: int8
+ IN 4: R{ } offset: 0 typ: string
+ IN 5: R{ I8 } spilloffset: 57 typ: int8
+ IN 6: R{ } offset: 16 typ: int64
+ IN 7: R{ } offset: 24 typ: []int32
+ OUT 0: R{ I0 I1 } spilloffset: -1 typ: string
+ OUT 1: R{ I2 } spilloffset: -1 typ: int64
+ OUT 2: R{ I3 I4 } spilloffset: -1 typ: string
+ OUT 3: R{ I5 I6 I7 } spilloffset: -1 typ: []int32
+ offsetToSpillArea: 48 spillAreaSize: 64
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsMethod(t *testing.T) {
+ // type s1 struct { f1 int16; f2 int16; f3 int16 }
+ // func(p1 *s1, p2 [7]*s1, p3 float64, p4 int16, p5 int16, p6 int16)
+ // (r1 [7]*s1, r2 float64, r3 int64)
+ i16 := types.Types[types.TINT16]
+ i64 := types.Types[types.TINT64]
+ f64 := types.Types[types.TFLOAT64]
+ s1 := mkstruct([]*types.Type{i16, i16, i16})
+ ps1 := types.NewPtr(s1)
+ a7 := types.NewArray(ps1, 7)
+ ft := mkFuncType(s1, []*types.Type{ps1, a7, f64, i16, i16, i16},
+ []*types.Type{a7, f64, i64})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 I1 I2 } spilloffset: 0 typ: struct { int16; int16; int16 }
+ IN 1: R{ I3 } spilloffset: 8 typ: *struct { int16; int16; int16 }
+ IN 2: R{ } offset: 0 typ: [7]*struct { int16; int16; int16 }
+ IN 3: R{ F0 } spilloffset: 16 typ: float64
+ IN 4: R{ I4 } spilloffset: 24 typ: int16
+ IN 5: R{ I5 } spilloffset: 26 typ: int16
+ IN 6: R{ I6 } spilloffset: 28 typ: int16
+ OUT 0: R{ } offset: 56 typ: [7]*struct { int16; int16; int16 }
+ OUT 1: R{ F0 } spilloffset: -1 typ: float64
+ OUT 2: R{ I0 } spilloffset: -1 typ: int64
+ offsetToSpillArea: 112 spillAreaSize: 32
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABIUtilsInterfaces(t *testing.T) {
+ // type s1 { f1 int16; f2 int16; f3 bool)
+ // type nei interface { ...() string }
+ // func(p1 s1, p2 interface{}, p3 interface{}, p4 nei,
+ // p5 *interface{}, p6 nei, p7 int64)
+ // (r1 interface{}, r2 nei, r3 bool)
+ ei := types.Types[types.TINTER] // interface{}
+ pei := types.NewPtr(ei) // *interface{}
+ fldt := mkFuncType(types.FakeRecvType(), []*types.Type{},
+ []*types.Type{types.Types[types.TSTRING]})
+ field := types.NewField(src.NoXPos, typecheck.Lookup("F"), fldt)
+ nei := types.NewInterface([]*types.Field{field})
+ i16 := types.Types[types.TINT16]
+ tb := types.Types[types.TBOOL]
+ s1 := mkstruct([]*types.Type{i16, i16, tb})
+ ft := mkFuncType(nil, []*types.Type{s1, ei, ei, nei, pei, nei, i16},
+ []*types.Type{ei, nei, pei})
+
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 I1 I2 } spilloffset: 0 typ: struct { int16; int16; bool }
+ IN 1: R{ I3 I4 } spilloffset: 8 typ: interface {}
+ IN 2: R{ I5 I6 } spilloffset: 24 typ: interface {}
+ IN 3: R{ I7 I8 } spilloffset: 40 typ: interface { F() string }
+ IN 4: R{ } offset: 0 typ: *interface {}
+ IN 5: R{ } offset: 8 typ: interface { F() string }
+ IN 6: R{ } offset: 24 typ: int16
+ OUT 0: R{ I0 I1 } spilloffset: -1 typ: interface {}
+ OUT 1: R{ I2 I3 } spilloffset: -1 typ: interface { F() string }
+ OUT 2: R{ I4 } spilloffset: -1 typ: *interface {}
+ offsetToSpillArea: 32 spillAreaSize: 56
+`)
+
+ abitest(t, ft, exp)
+}
+
+func TestABINumParamRegs(t *testing.T) {
+ i8 := types.Types[types.TINT8]
+ i16 := types.Types[types.TINT16]
+ i32 := types.Types[types.TINT32]
+ i64 := types.Types[types.TINT64]
+ f32 := types.Types[types.TFLOAT32]
+ f64 := types.Types[types.TFLOAT64]
+ c64 := types.Types[types.TCOMPLEX64]
+ c128 := types.Types[types.TCOMPLEX128]
+
+ s := mkstruct([]*types.Type{i8, i8, mkstruct([]*types.Type{}), i8, i16})
+ a := types.NewArray(s, 3)
+
+ nrtest(t, i8, 1)
+ nrtest(t, i16, 1)
+ nrtest(t, i32, 1)
+ nrtest(t, i64, 1)
+ nrtest(t, f32, 1)
+ nrtest(t, f64, 1)
+ nrtest(t, c64, 2)
+ nrtest(t, c128, 2)
+ nrtest(t, s, 4)
+ nrtest(t, a, 12)
+
+}
+
+func TestABIUtilsComputePadding(t *testing.T) {
+ // type s1 { f1 int8; f2 int16; f3 struct{}; f4 int32; f5 int64 }
+ i8 := types.Types[types.TINT8]
+ i16 := types.Types[types.TINT16]
+ i32 := types.Types[types.TINT32]
+ i64 := types.Types[types.TINT64]
+ emptys := mkstruct([]*types.Type{})
+ s1 := mkstruct([]*types.Type{i8, i16, emptys, i32, i64})
+ // func (p1 int32, p2 s1, p3 emptys, p4 [1]int32)
+ a1 := types.NewArray(i32, 1)
+ ft := mkFuncType(nil, []*types.Type{i32, s1, emptys, a1}, []*types.Type{})
+
+ // Run abitest() just to document what we're expected to see.
+ exp := makeExpectedDump(`
+ IN 0: R{ I0 } spilloffset: 0 typ: int32
+ IN 1: R{ I1 I2 I3 I4 } spilloffset: 8 typ: struct { int8; int16; struct {}; int32; int64 }
+ IN 2: R{ } offset: 0 typ: struct {}
+ IN 3: R{ I5 } spilloffset: 24 typ: [1]int32
+ offsetToSpillArea: 0 spillAreaSize: 32
+`)
+ abitest(t, ft, exp)
+
+ // Analyze with full set of registers, then call ComputePadding
+ // on the second param, verifying the results.
+ regRes := configAMD64.ABIAnalyze(ft, false)
+ padding := make([]uint64, 32)
+ parm := regRes.InParams()[1]
+ padding = parm.ComputePadding(padding)
+ want := "[1 1 1 0]"
+ got := fmt.Sprintf("%+v", padding)
+ if got != want {
+ t.Errorf("padding mismatch: wanted %q got %q\n", got, want)
+ }
+}
diff --git a/src/cmd/compile/internal/test/abiutilsaux_test.go b/src/cmd/compile/internal/test/abiutilsaux_test.go
new file mode 100644
index 0000000..07b8eb7
--- /dev/null
+++ b/src/cmd/compile/internal/test/abiutilsaux_test.go
@@ -0,0 +1,132 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+// This file contains utility routines and harness infrastructure used
+// by the ABI tests in "abiutils_test.go".
+
+import (
+ "cmd/compile/internal/abi"
+ "cmd/compile/internal/ir"
+ "cmd/compile/internal/typecheck"
+ "cmd/compile/internal/types"
+ "cmd/internal/src"
+ "fmt"
+ "strings"
+ "testing"
+ "text/scanner"
+)
+
+func mkParamResultField(t *types.Type, s *types.Sym, which ir.Class) *types.Field {
+ field := types.NewField(src.NoXPos, s, t)
+ n := typecheck.NewName(s)
+ n.Class = which
+ field.Nname = n
+ n.SetType(t)
+ return field
+}
+
+// mkstruct is a helper routine to create a struct type with fields
+// of the types specified in 'fieldtypes'.
+func mkstruct(fieldtypes []*types.Type) *types.Type {
+ fields := make([]*types.Field, len(fieldtypes))
+ for k, t := range fieldtypes {
+ if t == nil {
+ panic("bad -- field has no type")
+ }
+ f := types.NewField(src.NoXPos, nil, t)
+ fields[k] = f
+ }
+ s := types.NewStruct(fields)
+ return s
+}
+
+func mkFuncType(rcvr *types.Type, ins []*types.Type, outs []*types.Type) *types.Type {
+ q := typecheck.Lookup("?")
+ inf := []*types.Field{}
+ for _, it := range ins {
+ inf = append(inf, mkParamResultField(it, q, ir.PPARAM))
+ }
+ outf := []*types.Field{}
+ for _, ot := range outs {
+ outf = append(outf, mkParamResultField(ot, q, ir.PPARAMOUT))
+ }
+ var rf *types.Field
+ if rcvr != nil {
+ rf = mkParamResultField(rcvr, q, ir.PPARAM)
+ }
+ return types.NewSignature(rf, inf, outf)
+}
+
+type expectedDump struct {
+ dump string
+ file string
+ line int
+}
+
+func tokenize(src string) []string {
+ var s scanner.Scanner
+ s.Init(strings.NewReader(src))
+ res := []string{}
+ for tok := s.Scan(); tok != scanner.EOF; tok = s.Scan() {
+ res = append(res, s.TokenText())
+ }
+ return res
+}
+
+func verifyParamResultOffset(t *testing.T, f *types.Field, r abi.ABIParamAssignment, which string, idx int) int {
+ n := ir.AsNode(f.Nname).(*ir.Name)
+ if n.FrameOffset() != int64(r.Offset()) {
+ t.Errorf("%s %d: got offset %d wanted %d t=%v",
+ which, idx, r.Offset(), n.Offset_, f.Type)
+ return 1
+ }
+ return 0
+}
+
+func makeExpectedDump(e string) expectedDump {
+ return expectedDump{dump: e}
+}
+
+func difftokens(atoks []string, etoks []string) string {
+ if len(atoks) != len(etoks) {
+ return fmt.Sprintf("expected %d tokens got %d",
+ len(etoks), len(atoks))
+ }
+ for i := 0; i < len(etoks); i++ {
+ if etoks[i] == atoks[i] {
+ continue
+ }
+
+ return fmt.Sprintf("diff at token %d: expected %q got %q",
+ i, etoks[i], atoks[i])
+ }
+ return ""
+}
+
+func nrtest(t *testing.T, ft *types.Type, expected int) {
+ types.CalcSize(ft)
+ got := configAMD64.NumParamRegs(ft)
+ if got != expected {
+ t.Errorf("]\nexpected num regs = %d, got %d, type %v", expected, got, ft)
+ }
+}
+
+func abitest(t *testing.T, ft *types.Type, exp expectedDump) {
+
+ types.CalcSize(ft)
+
+ // Analyze with full set of registers.
+ regRes := configAMD64.ABIAnalyze(ft, false)
+ regResString := strings.TrimSpace(regRes.String())
+
+ // Check results.
+ reason := difftokens(tokenize(regResString), tokenize(exp.dump))
+ if reason != "" {
+ t.Errorf("\nexpected:\n%s\ngot:\n%s\nreason: %s",
+ strings.TrimSpace(exp.dump), regResString, reason)
+ }
+
+}
diff --git a/src/cmd/compile/internal/test/align_test.go b/src/cmd/compile/internal/test/align_test.go
new file mode 100644
index 0000000..32afc92
--- /dev/null
+++ b/src/cmd/compile/internal/test/align_test.go
@@ -0,0 +1,96 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test to make sure that equality functions (and hash
+// functions) don't do unaligned reads on architectures
+// that can't do unaligned reads. See issue 46283.
+
+package test
+
+import "testing"
+
+type T1 struct {
+ x float32
+ a, b, c, d int16 // memequal64
+}
+type T2 struct {
+ x float32
+ a, b, c, d int32 // memequal128
+}
+
+type A2 [2]byte // eq uses a 2-byte load
+type A4 [4]byte // eq uses a 4-byte load
+type A8 [8]byte // eq uses an 8-byte load
+
+//go:noinline
+func cmpT1(p, q *T1) {
+ if *p != *q {
+ panic("comparison test wrong")
+ }
+}
+
+//go:noinline
+func cmpT2(p, q *T2) {
+ if *p != *q {
+ panic("comparison test wrong")
+ }
+}
+
+//go:noinline
+func cmpA2(p, q *A2) {
+ if *p != *q {
+ panic("comparison test wrong")
+ }
+}
+
+//go:noinline
+func cmpA4(p, q *A4) {
+ if *p != *q {
+ panic("comparison test wrong")
+ }
+}
+
+//go:noinline
+func cmpA8(p, q *A8) {
+ if *p != *q {
+ panic("comparison test wrong")
+ }
+}
+
+func TestAlignEqual(t *testing.T) {
+ cmpT1(&T1{}, &T1{})
+ cmpT2(&T2{}, &T2{})
+
+ m1 := map[T1]bool{}
+ m1[T1{}] = true
+ m1[T1{}] = false
+ if len(m1) != 1 {
+ t.Fatalf("len(m1)=%d, want 1", len(m1))
+ }
+ m2 := map[T2]bool{}
+ m2[T2{}] = true
+ m2[T2{}] = false
+ if len(m2) != 1 {
+ t.Fatalf("len(m2)=%d, want 1", len(m2))
+ }
+
+ type X2 struct {
+ y byte
+ z A2
+ }
+ var x2 X2
+ cmpA2(&x2.z, &A2{})
+ type X4 struct {
+ y byte
+ z A4
+ }
+ var x4 X4
+ cmpA4(&x4.z, &A4{})
+ type X8 struct {
+ y byte
+ z A8
+ }
+ var x8 X8
+ cmpA8(&x8.z, &A8{})
+}
diff --git a/src/cmd/compile/internal/test/bench_test.go b/src/cmd/compile/internal/test/bench_test.go
new file mode 100644
index 0000000..4724600
--- /dev/null
+++ b/src/cmd/compile/internal/test/bench_test.go
@@ -0,0 +1,124 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import "testing"
+
+var globl int64
+var globl32 int32
+
+func BenchmarkLoadAdd(b *testing.B) {
+ x := make([]int64, 1024)
+ y := make([]int64, 1024)
+ for i := 0; i < b.N; i++ {
+ var s int64
+ for i := range x {
+ s ^= x[i] + y[i]
+ }
+ globl = s
+ }
+}
+
+// Added for ppc64 extswsli on power9
+func BenchmarkExtShift(b *testing.B) {
+ x := make([]int32, 1024)
+ for i := 0; i < b.N; i++ {
+ var s int64
+ for i := range x {
+ s ^= int64(x[i]+32) * 8
+ }
+ globl = s
+ }
+}
+
+func BenchmarkModify(b *testing.B) {
+ a := make([]int64, 1024)
+ v := globl
+ for i := 0; i < b.N; i++ {
+ for j := range a {
+ a[j] += v
+ }
+ }
+}
+
+func BenchmarkMullImm(b *testing.B) {
+ x := make([]int32, 1024)
+ for i := 0; i < b.N; i++ {
+ var s int32
+ for i := range x {
+ s += x[i] * 100
+ }
+ globl32 = s
+ }
+}
+
+func BenchmarkConstModify(b *testing.B) {
+ a := make([]int64, 1024)
+ for i := 0; i < b.N; i++ {
+ for j := range a {
+ a[j] += 3
+ }
+ }
+}
+
+func BenchmarkBitSet(b *testing.B) {
+ const N = 64 * 8
+ a := make([]uint64, N/64)
+ for i := 0; i < b.N; i++ {
+ for j := uint64(0); j < N; j++ {
+ a[j/64] |= 1 << (j % 64)
+ }
+ }
+}
+
+func BenchmarkBitClear(b *testing.B) {
+ const N = 64 * 8
+ a := make([]uint64, N/64)
+ for i := 0; i < b.N; i++ {
+ for j := uint64(0); j < N; j++ {
+ a[j/64] &^= 1 << (j % 64)
+ }
+ }
+}
+
+func BenchmarkBitToggle(b *testing.B) {
+ const N = 64 * 8
+ a := make([]uint64, N/64)
+ for i := 0; i < b.N; i++ {
+ for j := uint64(0); j < N; j++ {
+ a[j/64] ^= 1 << (j % 64)
+ }
+ }
+}
+
+func BenchmarkBitSetConst(b *testing.B) {
+ const N = 64
+ a := make([]uint64, N)
+ for i := 0; i < b.N; i++ {
+ for j := range a {
+ a[j] |= 1 << 37
+ }
+ }
+}
+
+func BenchmarkBitClearConst(b *testing.B) {
+ const N = 64
+ a := make([]uint64, N)
+ for i := 0; i < b.N; i++ {
+ for j := range a {
+ a[j] &^= 1 << 37
+ }
+ }
+}
+
+func BenchmarkBitToggleConst(b *testing.B) {
+ const N = 64
+ a := make([]uint64, N)
+ for i := 0; i < b.N; i++ {
+ for j := range a {
+ a[j] ^= 1 << 37
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/clobberdead_test.go b/src/cmd/compile/internal/test/clobberdead_test.go
new file mode 100644
index 0000000..80d9678
--- /dev/null
+++ b/src/cmd/compile/internal/test/clobberdead_test.go
@@ -0,0 +1,54 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+const helloSrc = `
+package main
+import "fmt"
+func main() { fmt.Println("hello") }
+`
+
+func TestClobberDead(t *testing.T) {
+ // Test that clobberdead mode generates correct program.
+ runHello(t, "-clobberdead")
+}
+
+func TestClobberDeadReg(t *testing.T) {
+ // Test that clobberdeadreg mode generates correct program.
+ runHello(t, "-clobberdeadreg")
+}
+
+func runHello(t *testing.T, flag string) {
+ if testing.Short() {
+ // This test rebuilds the runtime with a special flag, which
+ // takes a while.
+ t.Skip("skip in short mode")
+ }
+ testenv.MustHaveGoRun(t)
+ t.Parallel()
+
+ tmpdir := t.TempDir()
+ src := filepath.Join(tmpdir, "x.go")
+ err := os.WriteFile(src, []byte(helloSrc), 0644)
+ if err != nil {
+ t.Fatalf("write file failed: %v", err)
+ }
+
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "run", "-gcflags=all="+flag, src)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("go run failed: %v\n%s", err, out)
+ }
+ if string(out) != "hello\n" {
+ t.Errorf("wrong output: got %q, want %q", out, "hello\n")
+ }
+}
diff --git a/src/cmd/compile/internal/test/constFold_test.go b/src/cmd/compile/internal/test/constFold_test.go
new file mode 100644
index 0000000..7159f0e
--- /dev/null
+++ b/src/cmd/compile/internal/test/constFold_test.go
@@ -0,0 +1,18111 @@
+// run
+// Code generated by gen/constFoldGen.go. DO NOT EDIT.
+
+package test
+
+import "testing"
+
+func TestConstFolduint64add(t *testing.T) {
+ var x, y, r uint64
+ x = 0
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967296 {
+ t.Errorf("0 %s 4294967296 = %d, want 4294967296", "+", r)
+ }
+ y = 18446744073709551615
+ r = x + y
+ if r != 18446744073709551615 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 18446744073709551615", "+", r)
+ }
+ x = 1
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967297 {
+ t.Errorf("1 %s 4294967296 = %d, want 4294967297", "+", r)
+ }
+ y = 18446744073709551615
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "+", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x + y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 4294967297 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967297", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 8589934592", "+", r)
+ }
+ y = 18446744073709551615
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 4294967295", "+", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x + y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 0", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 4294967295", "+", r)
+ }
+ y = 18446744073709551615
+ r = x + y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 18446744073709551614", "+", r)
+ }
+}
+func TestConstFolduint64sub(t *testing.T) {
+ var x, y, r uint64
+ x = 0
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 18446744073709551615 {
+ t.Errorf("0 %s 1 = %d, want 18446744073709551615", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 18446744069414584320 {
+ t.Errorf("0 %s 4294967296 = %d, want 18446744069414584320", "-", r)
+ }
+ y = 18446744073709551615
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 1", "-", r)
+ }
+ x = 1
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 18446744069414584321 {
+ t.Errorf("1 %s 4294967296 = %d, want 18446744069414584321", "-", r)
+ }
+ y = 18446744073709551615
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 2", "-", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x - y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 4294967295 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967295", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "-", r)
+ }
+ y = 18446744073709551615
+ r = x - y
+ if r != 4294967297 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 4294967297", "-", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x - y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551614", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 18446744069414584319 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 18446744069414584319", "-", r)
+ }
+ y = 18446744073709551615
+ r = x - y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 0", "-", r)
+ }
+}
+func TestConstFolduint64div(t *testing.T) {
+ var x, y, r uint64
+ x = 0
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "/", r)
+ }
+ y = 18446744073709551615
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "/", r)
+ }
+ y = 18446744073709551615
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "/", r)
+ }
+ x = 4294967296
+ y = 1
+ r = x / y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967296", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 1 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 1", "/", r)
+ }
+ y = 18446744073709551615
+ r = x / y
+ if r != 0 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 0", "/", r)
+ }
+ x = 18446744073709551615
+ y = 1
+ r = x / y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551615", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 4294967295 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 4294967295", "/", r)
+ }
+ y = 18446744073709551615
+ r = x / y
+ if r != 1 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 1", "/", r)
+ }
+}
+func TestConstFolduint64mul(t *testing.T) {
+ var x, y, r uint64
+ x = 0
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 18446744073709551615
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("1 %s 4294967296 = %d, want 4294967296", "*", r)
+ }
+ y = 18446744073709551615
+ r = x * y
+ if r != 18446744073709551615 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 18446744073709551615", "*", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967296", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 18446744073709551615
+ r = x * y
+ if r != 18446744069414584320 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 18446744069414584320", "*", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551615", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 18446744069414584320 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 18446744069414584320", "*", r)
+ }
+ y = 18446744073709551615
+ r = x * y
+ if r != 1 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 1", "*", r)
+ }
+}
+func TestConstFolduint64mod(t *testing.T) {
+ var x, y, r uint64
+ x = 0
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 18446744073709551615
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 4294967296 = %d, want 1", "%", r)
+ }
+ y = 18446744073709551615
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 1", "%", r)
+ }
+ x = 4294967296
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 18446744073709551615
+ r = x % y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 4294967296", "%", r)
+ }
+ x = 18446744073709551615
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 4294967295 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 4294967295", "%", r)
+ }
+ y = 18446744073709551615
+ r = x % y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 0", "%", r)
+ }
+}
+func TestConstFoldint64add(t *testing.T) {
+ var x, y, r int64
+ x = -9223372036854775808
+ y = -9223372036854775808
+ r = x + y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775808 = %d, want 0", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != 1 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775807 = %d, want 1", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != 9223372032559808512 {
+ t.Errorf("-9223372036854775808 %s -4294967296 = %d, want 9223372032559808512", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("-9223372036854775808 %s -1 = %d, want 9223372036854775807", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -9223372036854775807", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != -9223372032559808512 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want -9223372032559808512", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != -2 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775806 = %d, want -2", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775807 = %d, want -1", "+", r)
+ }
+ x = -9223372036854775807
+ y = -9223372036854775808
+ r = x + y
+ if r != 1 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775808 = %d, want 1", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775807 = %d, want 2", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != 9223372032559808513 {
+ t.Errorf("-9223372036854775807 %s -4294967296 = %d, want 9223372032559808513", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775807 %s -1 = %d, want -9223372036854775808", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -9223372036854775806 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -9223372036854775806", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != -9223372032559808511 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want -9223372032559808511", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775806 = %d, want -1", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775807 = %d, want 0", "+", r)
+ }
+ x = -4294967296
+ y = -9223372036854775808
+ r = x + y
+ if r != 9223372032559808512 {
+ t.Errorf("-4294967296 %s -9223372036854775808 = %d, want 9223372032559808512", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != 9223372032559808513 {
+ t.Errorf("-4294967296 %s -9223372036854775807 = %d, want 9223372032559808513", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s -4294967296 = %d, want -8589934592", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -4294967297 {
+ t.Errorf("-4294967296 %s -1 = %d, want -4294967297", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -4294967295 {
+ t.Errorf("-4294967296 %s 1 = %d, want -4294967295", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want 0", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != 9223372032559808510 {
+ t.Errorf("-4294967296 %s 9223372036854775806 = %d, want 9223372032559808510", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != 9223372032559808511 {
+ t.Errorf("-4294967296 %s 9223372036854775807 = %d, want 9223372032559808511", "+", r)
+ }
+ x = -1
+ y = -9223372036854775808
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("-1 %s -9223372036854775808 = %d, want 9223372036854775807", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("-1 %s -9223372036854775807 = %d, want -9223372036854775808", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != -4294967297 {
+ t.Errorf("-1 %s -4294967296 = %d, want -4294967297", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -2 {
+ t.Errorf("-1 %s -1 = %d, want -2", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("-1 %s 4294967296 = %d, want 4294967295", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != 9223372036854775805 {
+ t.Errorf("-1 %s 9223372036854775806 = %d, want 9223372036854775805", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != 9223372036854775806 {
+ t.Errorf("-1 %s 9223372036854775807 = %d, want 9223372036854775806", "+", r)
+ }
+ x = 0
+ y = -9223372036854775808
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("0 %s -9223372036854775808 = %d, want -9223372036854775808", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != -9223372036854775807 {
+ t.Errorf("0 %s -9223372036854775807 = %d, want -9223372036854775807", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != -4294967296 {
+ t.Errorf("0 %s -4294967296 = %d, want -4294967296", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -1 {
+ t.Errorf("0 %s -1 = %d, want -1", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967296 {
+ t.Errorf("0 %s 4294967296 = %d, want 4294967296", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != 9223372036854775806 {
+ t.Errorf("0 %s 9223372036854775806 = %d, want 9223372036854775806", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("0 %s 9223372036854775807 = %d, want 9223372036854775807", "+", r)
+ }
+ x = 1
+ y = -9223372036854775808
+ r = x + y
+ if r != -9223372036854775807 {
+ t.Errorf("1 %s -9223372036854775808 = %d, want -9223372036854775807", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != -9223372036854775806 {
+ t.Errorf("1 %s -9223372036854775807 = %d, want -9223372036854775806", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != -4294967295 {
+ t.Errorf("1 %s -4294967296 = %d, want -4294967295", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 4294967297 {
+ t.Errorf("1 %s 4294967296 = %d, want 4294967297", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("1 %s 9223372036854775806 = %d, want 9223372036854775807", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("1 %s 9223372036854775807 = %d, want -9223372036854775808", "+", r)
+ }
+ x = 4294967296
+ y = -9223372036854775808
+ r = x + y
+ if r != -9223372032559808512 {
+ t.Errorf("4294967296 %s -9223372036854775808 = %d, want -9223372032559808512", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != -9223372032559808511 {
+ t.Errorf("4294967296 %s -9223372036854775807 = %d, want -9223372032559808511", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != 0 {
+ t.Errorf("4294967296 %s -4294967296 = %d, want 0", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("4294967296 %s -1 = %d, want 4294967295", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 4294967297 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967297", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 8589934592", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != -9223372032559808514 {
+ t.Errorf("4294967296 %s 9223372036854775806 = %d, want -9223372032559808514", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != -9223372032559808513 {
+ t.Errorf("4294967296 %s 9223372036854775807 = %d, want -9223372032559808513", "+", r)
+ }
+ x = 9223372036854775806
+ y = -9223372036854775808
+ r = x + y
+ if r != -2 {
+ t.Errorf("9223372036854775806 %s -9223372036854775808 = %d, want -2", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != -1 {
+ t.Errorf("9223372036854775806 %s -9223372036854775807 = %d, want -1", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != 9223372032559808510 {
+ t.Errorf("9223372036854775806 %s -4294967296 = %d, want 9223372032559808510", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 9223372036854775805 {
+ t.Errorf("9223372036854775806 %s -1 = %d, want 9223372036854775805", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 9223372036854775807", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != -9223372032559808514 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want -9223372032559808514", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != -4 {
+ t.Errorf("9223372036854775806 %s 9223372036854775806 = %d, want -4", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != -3 {
+ t.Errorf("9223372036854775806 %s 9223372036854775807 = %d, want -3", "+", r)
+ }
+ x = 9223372036854775807
+ y = -9223372036854775808
+ r = x + y
+ if r != -1 {
+ t.Errorf("9223372036854775807 %s -9223372036854775808 = %d, want -1", "+", r)
+ }
+ y = -9223372036854775807
+ r = x + y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s -9223372036854775807 = %d, want 0", "+", r)
+ }
+ y = -4294967296
+ r = x + y
+ if r != 9223372032559808511 {
+ t.Errorf("9223372036854775807 %s -4294967296 = %d, want 9223372032559808511", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775807 %s -1 = %d, want 9223372036854775806", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -9223372036854775808 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want -9223372036854775808", "+", r)
+ }
+ y = 4294967296
+ r = x + y
+ if r != -9223372032559808513 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want -9223372032559808513", "+", r)
+ }
+ y = 9223372036854775806
+ r = x + y
+ if r != -3 {
+ t.Errorf("9223372036854775807 %s 9223372036854775806 = %d, want -3", "+", r)
+ }
+ y = 9223372036854775807
+ r = x + y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s 9223372036854775807 = %d, want -2", "+", r)
+ }
+}
+func TestConstFoldint64sub(t *testing.T) {
+ var x, y, r int64
+ x = -9223372036854775808
+ y = -9223372036854775808
+ r = x - y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775808 = %d, want 0", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775807 = %d, want -1", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != -9223372032559808512 {
+ t.Errorf("-9223372036854775808 %s -4294967296 = %d, want -9223372032559808512", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775808 %s -1 = %d, want -9223372036854775807", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 9223372036854775807 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 9223372036854775807", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 9223372032559808512 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want 9223372032559808512", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != 2 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775806 = %d, want 2", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != 1 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775807 = %d, want 1", "-", r)
+ }
+ x = -9223372036854775807
+ y = -9223372036854775808
+ r = x - y
+ if r != 1 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775808 = %d, want 1", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775807 = %d, want 0", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != -9223372032559808511 {
+ t.Errorf("-9223372036854775807 %s -4294967296 = %d, want -9223372032559808511", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -9223372036854775806 {
+ t.Errorf("-9223372036854775807 %s -1 = %d, want -9223372036854775806", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -9223372036854775808", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 9223372032559808513 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want 9223372032559808513", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != 3 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775806 = %d, want 3", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775807 = %d, want 2", "-", r)
+ }
+ x = -4294967296
+ y = -9223372036854775808
+ r = x - y
+ if r != 9223372032559808512 {
+ t.Errorf("-4294967296 %s -9223372036854775808 = %d, want 9223372032559808512", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != 9223372032559808511 {
+ t.Errorf("-4294967296 %s -9223372036854775807 = %d, want 9223372032559808511", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -4294967296 = %d, want 0", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -4294967295 {
+ t.Errorf("-4294967296 %s -1 = %d, want -4294967295", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -4294967297 {
+ t.Errorf("-4294967296 %s 1 = %d, want -4294967297", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want -8589934592", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != 9223372032559808514 {
+ t.Errorf("-4294967296 %s 9223372036854775806 = %d, want 9223372032559808514", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != 9223372032559808513 {
+ t.Errorf("-4294967296 %s 9223372036854775807 = %d, want 9223372032559808513", "-", r)
+ }
+ x = -1
+ y = -9223372036854775808
+ r = x - y
+ if r != 9223372036854775807 {
+ t.Errorf("-1 %s -9223372036854775808 = %d, want 9223372036854775807", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != 9223372036854775806 {
+ t.Errorf("-1 %s -9223372036854775807 = %d, want 9223372036854775806", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != 4294967295 {
+ t.Errorf("-1 %s -4294967296 = %d, want 4294967295", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != -4294967297 {
+ t.Errorf("-1 %s 4294967296 = %d, want -4294967297", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != -9223372036854775807 {
+ t.Errorf("-1 %s 9223372036854775806 = %d, want -9223372036854775807", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("-1 %s 9223372036854775807 = %d, want -9223372036854775808", "-", r)
+ }
+ x = 0
+ y = -9223372036854775808
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("0 %s -9223372036854775808 = %d, want -9223372036854775808", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != 9223372036854775807 {
+ t.Errorf("0 %s -9223372036854775807 = %d, want 9223372036854775807", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != 4294967296 {
+ t.Errorf("0 %s -4294967296 = %d, want 4294967296", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s -1 = %d, want 1", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -1 {
+ t.Errorf("0 %s 1 = %d, want -1", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != -4294967296 {
+ t.Errorf("0 %s 4294967296 = %d, want -4294967296", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != -9223372036854775806 {
+ t.Errorf("0 %s 9223372036854775806 = %d, want -9223372036854775806", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != -9223372036854775807 {
+ t.Errorf("0 %s 9223372036854775807 = %d, want -9223372036854775807", "-", r)
+ }
+ x = 1
+ y = -9223372036854775808
+ r = x - y
+ if r != -9223372036854775807 {
+ t.Errorf("1 %s -9223372036854775808 = %d, want -9223372036854775807", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("1 %s -9223372036854775807 = %d, want -9223372036854775808", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != 4294967297 {
+ t.Errorf("1 %s -4294967296 = %d, want 4294967297", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s -1 = %d, want 2", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != -4294967295 {
+ t.Errorf("1 %s 4294967296 = %d, want -4294967295", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != -9223372036854775805 {
+ t.Errorf("1 %s 9223372036854775806 = %d, want -9223372036854775805", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != -9223372036854775806 {
+ t.Errorf("1 %s 9223372036854775807 = %d, want -9223372036854775806", "-", r)
+ }
+ x = 4294967296
+ y = -9223372036854775808
+ r = x - y
+ if r != -9223372032559808512 {
+ t.Errorf("4294967296 %s -9223372036854775808 = %d, want -9223372032559808512", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != -9223372032559808513 {
+ t.Errorf("4294967296 %s -9223372036854775807 = %d, want -9223372032559808513", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s -4294967296 = %d, want 8589934592", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 4294967297 {
+ t.Errorf("4294967296 %s -1 = %d, want 4294967297", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 4294967295 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967295", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != -9223372032559808510 {
+ t.Errorf("4294967296 %s 9223372036854775806 = %d, want -9223372032559808510", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != -9223372032559808511 {
+ t.Errorf("4294967296 %s 9223372036854775807 = %d, want -9223372032559808511", "-", r)
+ }
+ x = 9223372036854775806
+ y = -9223372036854775808
+ r = x - y
+ if r != -2 {
+ t.Errorf("9223372036854775806 %s -9223372036854775808 = %d, want -2", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != -3 {
+ t.Errorf("9223372036854775806 %s -9223372036854775807 = %d, want -3", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != -9223372032559808514 {
+ t.Errorf("9223372036854775806 %s -4294967296 = %d, want -9223372032559808514", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775806 %s -1 = %d, want 9223372036854775807", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 9223372036854775805 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 9223372036854775805", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 9223372032559808510 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want 9223372032559808510", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 9223372036854775806 = %d, want 0", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != -1 {
+ t.Errorf("9223372036854775806 %s 9223372036854775807 = %d, want -1", "-", r)
+ }
+ x = 9223372036854775807
+ y = -9223372036854775808
+ r = x - y
+ if r != -1 {
+ t.Errorf("9223372036854775807 %s -9223372036854775808 = %d, want -1", "-", r)
+ }
+ y = -9223372036854775807
+ r = x - y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s -9223372036854775807 = %d, want -2", "-", r)
+ }
+ y = -4294967296
+ r = x - y
+ if r != -9223372032559808513 {
+ t.Errorf("9223372036854775807 %s -4294967296 = %d, want -9223372032559808513", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -9223372036854775808 {
+ t.Errorf("9223372036854775807 %s -1 = %d, want -9223372036854775808", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 9223372036854775806", "-", r)
+ }
+ y = 4294967296
+ r = x - y
+ if r != 9223372032559808511 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want 9223372032559808511", "-", r)
+ }
+ y = 9223372036854775806
+ r = x - y
+ if r != 1 {
+ t.Errorf("9223372036854775807 %s 9223372036854775806 = %d, want 1", "-", r)
+ }
+ y = 9223372036854775807
+ r = x - y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 9223372036854775807 = %d, want 0", "-", r)
+ }
+}
+func TestConstFoldint64div(t *testing.T) {
+ var x, y, r int64
+ x = -9223372036854775808
+ y = -9223372036854775808
+ r = x / y
+ if r != 1 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775808 = %d, want 1", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 1 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775807 = %d, want 1", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 2147483648 {
+ t.Errorf("-9223372036854775808 %s -4294967296 = %d, want 2147483648", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s -1 = %d, want -9223372036854775808", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -9223372036854775808", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != -2147483648 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want -2147483648", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775806 = %d, want -1", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775807 = %d, want -1", "/", r)
+ }
+ x = -9223372036854775807
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 1 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775807 = %d, want 1", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 2147483647 {
+ t.Errorf("-9223372036854775807 %s -4294967296 = %d, want 2147483647", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s -1 = %d, want 9223372036854775807", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -9223372036854775807", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != -2147483647 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want -2147483647", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775806 = %d, want -1", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775807 = %d, want -1", "/", r)
+ }
+ x = -4294967296
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 1 {
+ t.Errorf("-4294967296 %s -4294967296 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 4294967296 {
+ t.Errorf("-4294967296 %s -1 = %d, want 4294967296", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 1 = %d, want -4294967296", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want -1", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 9223372036854775806 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = -1
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -4294967296 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967296 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 9223372036854775806 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = 0
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -4294967296 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775806 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -4294967296 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 9223372036854775806 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = 4294967296
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("4294967296 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("4294967296 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != -1 {
+ t.Errorf("4294967296 %s -4294967296 = %d, want -1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -4294967296 {
+ t.Errorf("4294967296 %s -1 = %d, want -4294967296", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967296", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 1 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 1", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 0 {
+ t.Errorf("4294967296 %s 9223372036854775806 = %d, want 0", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("4294967296 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = 9223372036854775806
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s -9223372036854775807 = %d, want 0", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != -2147483647 {
+ t.Errorf("9223372036854775806 %s -4294967296 = %d, want -2147483647", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -9223372036854775806 {
+ t.Errorf("9223372036854775806 %s -1 = %d, want -9223372036854775806", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 9223372036854775806", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 2147483647 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want 2147483647", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 1 {
+ t.Errorf("9223372036854775806 %s 9223372036854775806 = %d, want 1", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 9223372036854775807 = %d, want 0", "/", r)
+ }
+ x = 9223372036854775807
+ y = -9223372036854775808
+ r = x / y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s -9223372036854775808 = %d, want 0", "/", r)
+ }
+ y = -9223372036854775807
+ r = x / y
+ if r != -1 {
+ t.Errorf("9223372036854775807 %s -9223372036854775807 = %d, want -1", "/", r)
+ }
+ y = -4294967296
+ r = x / y
+ if r != -2147483647 {
+ t.Errorf("9223372036854775807 %s -4294967296 = %d, want -2147483647", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -9223372036854775807 {
+ t.Errorf("9223372036854775807 %s -1 = %d, want -9223372036854775807", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 9223372036854775807", "/", r)
+ }
+ y = 4294967296
+ r = x / y
+ if r != 2147483647 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want 2147483647", "/", r)
+ }
+ y = 9223372036854775806
+ r = x / y
+ if r != 1 {
+ t.Errorf("9223372036854775807 %s 9223372036854775806 = %d, want 1", "/", r)
+ }
+ y = 9223372036854775807
+ r = x / y
+ if r != 1 {
+ t.Errorf("9223372036854775807 %s 9223372036854775807 = %d, want 1", "/", r)
+ }
+}
+func TestConstFoldint64mul(t *testing.T) {
+ var x, y, r int64
+ x = -9223372036854775808
+ y = -9223372036854775808
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775808 = %d, want 0", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775807 = %d, want -9223372036854775808", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -4294967296 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s -1 = %d, want -9223372036854775808", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -9223372036854775808", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775806 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775807 = %d, want -9223372036854775808", "*", r)
+ }
+ x = -9223372036854775807
+ y = -9223372036854775808
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775808 = %d, want -9223372036854775808", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != 1 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775807 = %d, want 1", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("-9223372036854775807 %s -4294967296 = %d, want -4294967296", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s -1 = %d, want 9223372036854775807", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -9223372036854775807", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want 4294967296", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 9223372036854775806 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775806 = %d, want 9223372036854775806", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775807 = %d, want -1", "*", r)
+ }
+ x = -4294967296
+ y = -9223372036854775808
+ r = x * y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -9223372036854775808 = %d, want 0", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s -9223372036854775807 = %d, want -4294967296", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -4294967296 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("-4294967296 %s -1 = %d, want 4294967296", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 1 = %d, want -4294967296", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 8589934592 {
+ t.Errorf("-4294967296 %s 9223372036854775806 = %d, want 8589934592", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("-4294967296 %s 9223372036854775807 = %d, want 4294967296", "*", r)
+ }
+ x = -1
+ y = -9223372036854775808
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("-1 %s -9223372036854775808 = %d, want -9223372036854775808", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != 9223372036854775807 {
+ t.Errorf("-1 %s -9223372036854775807 = %d, want 9223372036854775807", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("-1 %s -4294967296 = %d, want 4294967296", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("-1 %s 4294967296 = %d, want -4294967296", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != -9223372036854775806 {
+ t.Errorf("-1 %s 9223372036854775806 = %d, want -9223372036854775806", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != -9223372036854775807 {
+ t.Errorf("-1 %s 9223372036854775807 = %d, want -9223372036854775807", "*", r)
+ }
+ x = 0
+ y = -9223372036854775808
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775808 = %d, want 0", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775807 = %d, want 0", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -4294967296 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775806 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775807 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = -9223372036854775808
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("1 %s -9223372036854775808 = %d, want -9223372036854775808", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != -9223372036854775807 {
+ t.Errorf("1 %s -9223372036854775807 = %d, want -9223372036854775807", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("1 %s -4294967296 = %d, want -4294967296", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("1 %s 4294967296 = %d, want 4294967296", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 9223372036854775806 {
+ t.Errorf("1 %s 9223372036854775806 = %d, want 9223372036854775806", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != 9223372036854775807 {
+ t.Errorf("1 %s 9223372036854775807 = %d, want 9223372036854775807", "*", r)
+ }
+ x = 4294967296
+ y = -9223372036854775808
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s -9223372036854775808 = %d, want 0", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s -9223372036854775807 = %d, want 4294967296", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s -4294967296 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("4294967296 %s -1 = %d, want -4294967296", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 1 = %d, want 4294967296", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != -8589934592 {
+ t.Errorf("4294967296 %s 9223372036854775806 = %d, want -8589934592", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("4294967296 %s 9223372036854775807 = %d, want -4294967296", "*", r)
+ }
+ x = 9223372036854775806
+ y = -9223372036854775808
+ r = x * y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s -9223372036854775808 = %d, want 0", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s -9223372036854775807 = %d, want 9223372036854775806", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 8589934592 {
+ t.Errorf("9223372036854775806 %s -4294967296 = %d, want 8589934592", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -9223372036854775806 {
+ t.Errorf("9223372036854775806 %s -1 = %d, want -9223372036854775806", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 9223372036854775806", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != -8589934592 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want -8589934592", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != 4 {
+ t.Errorf("9223372036854775806 %s 9223372036854775806 = %d, want 4", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != -9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 9223372036854775807 = %d, want -9223372036854775806", "*", r)
+ }
+ x = 9223372036854775807
+ y = -9223372036854775808
+ r = x * y
+ if r != -9223372036854775808 {
+ t.Errorf("9223372036854775807 %s -9223372036854775808 = %d, want -9223372036854775808", "*", r)
+ }
+ y = -9223372036854775807
+ r = x * y
+ if r != -1 {
+ t.Errorf("9223372036854775807 %s -9223372036854775807 = %d, want -1", "*", r)
+ }
+ y = -4294967296
+ r = x * y
+ if r != 4294967296 {
+ t.Errorf("9223372036854775807 %s -4294967296 = %d, want 4294967296", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -9223372036854775807 {
+ t.Errorf("9223372036854775807 %s -1 = %d, want -9223372036854775807", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 9223372036854775807", "*", r)
+ }
+ y = 4294967296
+ r = x * y
+ if r != -4294967296 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want -4294967296", "*", r)
+ }
+ y = 9223372036854775806
+ r = x * y
+ if r != -9223372036854775806 {
+ t.Errorf("9223372036854775807 %s 9223372036854775806 = %d, want -9223372036854775806", "*", r)
+ }
+ y = 9223372036854775807
+ r = x * y
+ if r != 1 {
+ t.Errorf("9223372036854775807 %s 9223372036854775807 = %d, want 1", "*", r)
+ }
+}
+func TestConstFoldint64mod(t *testing.T) {
+ var x, y, r int64
+ x = -9223372036854775808
+ y = -9223372036854775808
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775808 = %d, want 0", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s -9223372036854775807 = %d, want -1", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -4294967296 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != -2 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775806 = %d, want -2", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 9223372036854775807 = %d, want -1", "%", r)
+ }
+ x = -9223372036854775807
+ y = -9223372036854775808
+ r = x % y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775808 = %d, want -9223372036854775807", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s -9223372036854775807 = %d, want 0", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != -4294967295 {
+ t.Errorf("-9223372036854775807 %s -4294967296 = %d, want -4294967295", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != -4294967295 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want -4294967295", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775806 = %d, want -1", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 9223372036854775807 = %d, want 0", "%", r)
+ }
+ x = -4294967296
+ y = -9223372036854775808
+ r = x % y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s -9223372036854775808 = %d, want -4294967296", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s -9223372036854775807 = %d, want -4294967296", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -4294967296 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-4294967296 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 9223372036854775806 = %d, want -4294967296", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 9223372036854775807 = %d, want -4294967296", "%", r)
+ }
+ x = -1
+ y = -9223372036854775808
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -9223372036854775808 = %d, want -1", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -9223372036854775807 = %d, want -1", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -4294967296 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967296 = %d, want -1", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 9223372036854775806 = %d, want -1", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 9223372036854775807 = %d, want -1", "%", r)
+ }
+ x = 0
+ y = -9223372036854775808
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775808 = %d, want 0", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -9223372036854775807 = %d, want 0", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -4294967296 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775806 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 9223372036854775807 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = -9223372036854775808
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -9223372036854775808 = %d, want 1", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -9223372036854775807 = %d, want 1", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -4294967296 = %d, want 1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 4294967296 = %d, want 1", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 9223372036854775806 = %d, want 1", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 9223372036854775807 = %d, want 1", "%", r)
+ }
+ x = 4294967296
+ y = -9223372036854775808
+ r = x % y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s -9223372036854775808 = %d, want 4294967296", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s -9223372036854775807 = %d, want 4294967296", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s -4294967296 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 9223372036854775806 = %d, want 4294967296", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 9223372036854775807 = %d, want 4294967296", "%", r)
+ }
+ x = 9223372036854775806
+ y = -9223372036854775808
+ r = x % y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s -9223372036854775808 = %d, want 9223372036854775806", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s -9223372036854775807 = %d, want 9223372036854775806", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 4294967294 {
+ t.Errorf("9223372036854775806 %s -4294967296 = %d, want 4294967294", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 4294967294 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want 4294967294", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 9223372036854775806 = %d, want 0", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 9223372036854775807 = %d, want 9223372036854775806", "%", r)
+ }
+ x = 9223372036854775807
+ y = -9223372036854775808
+ r = x % y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s -9223372036854775808 = %d, want 9223372036854775807", "%", r)
+ }
+ y = -9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s -9223372036854775807 = %d, want 0", "%", r)
+ }
+ y = -4294967296
+ r = x % y
+ if r != 4294967295 {
+ t.Errorf("9223372036854775807 %s -4294967296 = %d, want 4294967295", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967296
+ r = x % y
+ if r != 4294967295 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want 4294967295", "%", r)
+ }
+ y = 9223372036854775806
+ r = x % y
+ if r != 1 {
+ t.Errorf("9223372036854775807 %s 9223372036854775806 = %d, want 1", "%", r)
+ }
+ y = 9223372036854775807
+ r = x % y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 9223372036854775807 = %d, want 0", "%", r)
+ }
+}
+func TestConstFolduint32add(t *testing.T) {
+ var x, y, r uint32
+ x = 0
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 4294967295
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("0 %s 4294967295 = %d, want 4294967295", "+", r)
+ }
+ x = 1
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 4294967295
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "+", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x + y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("4294967295 %s 1 = %d, want 0", "+", r)
+ }
+ y = 4294967295
+ r = x + y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 4294967294", "+", r)
+ }
+}
+func TestConstFolduint32sub(t *testing.T) {
+ var x, y, r uint32
+ x = 0
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 4294967295 {
+ t.Errorf("0 %s 1 = %d, want 4294967295", "-", r)
+ }
+ y = 4294967295
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s 4294967295 = %d, want 1", "-", r)
+ }
+ x = 1
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 4294967295
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s 4294967295 = %d, want 2", "-", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x - y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967294", "-", r)
+ }
+ y = 4294967295
+ r = x - y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 0", "-", r)
+ }
+}
+func TestConstFolduint32div(t *testing.T) {
+ var x, y, r uint32
+ x = 0
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 4294967295
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 4294967295
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "/", r)
+ }
+ x = 4294967295
+ y = 1
+ r = x / y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967295", "/", r)
+ }
+ y = 4294967295
+ r = x / y
+ if r != 1 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 1", "/", r)
+ }
+}
+func TestConstFolduint32mul(t *testing.T) {
+ var x, y, r uint32
+ x = 0
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 4294967295
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 4294967295
+ r = x * y
+ if r != 4294967295 {
+ t.Errorf("1 %s 4294967295 = %d, want 4294967295", "*", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("4294967295 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967295", "*", r)
+ }
+ y = 4294967295
+ r = x * y
+ if r != 1 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 1", "*", r)
+ }
+}
+func TestConstFolduint32mod(t *testing.T) {
+ var x, y, r uint32
+ x = 0
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967295
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967295
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 4294967295 = %d, want 1", "%", r)
+ }
+ x = 4294967295
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967295 %s 1 = %d, want 0", "%", r)
+ }
+ y = 4294967295
+ r = x % y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 0", "%", r)
+ }
+}
+func TestConstFoldint32add(t *testing.T) {
+ var x, y, r int32
+ x = -2147483648
+ y = -2147483648
+ r = x + y
+ if r != 0 {
+ t.Errorf("-2147483648 %s -2147483648 = %d, want 0", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != 1 {
+ t.Errorf("-2147483648 %s -2147483647 = %d, want 1", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 2147483647 {
+ t.Errorf("-2147483648 %s -1 = %d, want 2147483647", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -2147483647 {
+ t.Errorf("-2147483648 %s 1 = %d, want -2147483647", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 2147483647 = %d, want -1", "+", r)
+ }
+ x = -2147483647
+ y = -2147483648
+ r = x + y
+ if r != 1 {
+ t.Errorf("-2147483647 %s -2147483648 = %d, want 1", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != 2 {
+ t.Errorf("-2147483647 %s -2147483647 = %d, want 2", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("-2147483647 %s -1 = %d, want -2147483648", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -2147483646 {
+ t.Errorf("-2147483647 %s 1 = %d, want -2147483646", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 2147483647 = %d, want 0", "+", r)
+ }
+ x = -1
+ y = -2147483648
+ r = x + y
+ if r != 2147483647 {
+ t.Errorf("-1 %s -2147483648 = %d, want 2147483647", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("-1 %s -2147483647 = %d, want -2147483648", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -2 {
+ t.Errorf("-1 %s -1 = %d, want -2", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != 2147483646 {
+ t.Errorf("-1 %s 2147483647 = %d, want 2147483646", "+", r)
+ }
+ x = 0
+ y = -2147483648
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("0 %s -2147483648 = %d, want -2147483648", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != -2147483647 {
+ t.Errorf("0 %s -2147483647 = %d, want -2147483647", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -1 {
+ t.Errorf("0 %s -1 = %d, want -1", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != 2147483647 {
+ t.Errorf("0 %s 2147483647 = %d, want 2147483647", "+", r)
+ }
+ x = 1
+ y = -2147483648
+ r = x + y
+ if r != -2147483647 {
+ t.Errorf("1 %s -2147483648 = %d, want -2147483647", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != -2147483646 {
+ t.Errorf("1 %s -2147483647 = %d, want -2147483646", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("1 %s 2147483647 = %d, want -2147483648", "+", r)
+ }
+ x = 2147483647
+ y = -2147483648
+ r = x + y
+ if r != -1 {
+ t.Errorf("2147483647 %s -2147483648 = %d, want -1", "+", r)
+ }
+ y = -2147483647
+ r = x + y
+ if r != 0 {
+ t.Errorf("2147483647 %s -2147483647 = %d, want 0", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 2147483646 {
+ t.Errorf("2147483647 %s -1 = %d, want 2147483646", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -2147483648 {
+ t.Errorf("2147483647 %s 1 = %d, want -2147483648", "+", r)
+ }
+ y = 2147483647
+ r = x + y
+ if r != -2 {
+ t.Errorf("2147483647 %s 2147483647 = %d, want -2", "+", r)
+ }
+}
+func TestConstFoldint32sub(t *testing.T) {
+ var x, y, r int32
+ x = -2147483648
+ y = -2147483648
+ r = x - y
+ if r != 0 {
+ t.Errorf("-2147483648 %s -2147483648 = %d, want 0", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != -1 {
+ t.Errorf("-2147483648 %s -2147483647 = %d, want -1", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -2147483647 {
+ t.Errorf("-2147483648 %s -1 = %d, want -2147483647", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 2147483647 {
+ t.Errorf("-2147483648 %s 1 = %d, want 2147483647", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != 1 {
+ t.Errorf("-2147483648 %s 2147483647 = %d, want 1", "-", r)
+ }
+ x = -2147483647
+ y = -2147483648
+ r = x - y
+ if r != 1 {
+ t.Errorf("-2147483647 %s -2147483648 = %d, want 1", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != 0 {
+ t.Errorf("-2147483647 %s -2147483647 = %d, want 0", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -2147483646 {
+ t.Errorf("-2147483647 %s -1 = %d, want -2147483646", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("-2147483647 %s 1 = %d, want -2147483648", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != 2 {
+ t.Errorf("-2147483647 %s 2147483647 = %d, want 2", "-", r)
+ }
+ x = -1
+ y = -2147483648
+ r = x - y
+ if r != 2147483647 {
+ t.Errorf("-1 %s -2147483648 = %d, want 2147483647", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != 2147483646 {
+ t.Errorf("-1 %s -2147483647 = %d, want 2147483646", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("-1 %s 2147483647 = %d, want -2147483648", "-", r)
+ }
+ x = 0
+ y = -2147483648
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("0 %s -2147483648 = %d, want -2147483648", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != 2147483647 {
+ t.Errorf("0 %s -2147483647 = %d, want 2147483647", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s -1 = %d, want 1", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -1 {
+ t.Errorf("0 %s 1 = %d, want -1", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != -2147483647 {
+ t.Errorf("0 %s 2147483647 = %d, want -2147483647", "-", r)
+ }
+ x = 1
+ y = -2147483648
+ r = x - y
+ if r != -2147483647 {
+ t.Errorf("1 %s -2147483648 = %d, want -2147483647", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("1 %s -2147483647 = %d, want -2147483648", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s -1 = %d, want 2", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != -2147483646 {
+ t.Errorf("1 %s 2147483647 = %d, want -2147483646", "-", r)
+ }
+ x = 2147483647
+ y = -2147483648
+ r = x - y
+ if r != -1 {
+ t.Errorf("2147483647 %s -2147483648 = %d, want -1", "-", r)
+ }
+ y = -2147483647
+ r = x - y
+ if r != -2 {
+ t.Errorf("2147483647 %s -2147483647 = %d, want -2", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -2147483648 {
+ t.Errorf("2147483647 %s -1 = %d, want -2147483648", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 2147483646 {
+ t.Errorf("2147483647 %s 1 = %d, want 2147483646", "-", r)
+ }
+ y = 2147483647
+ r = x - y
+ if r != 0 {
+ t.Errorf("2147483647 %s 2147483647 = %d, want 0", "-", r)
+ }
+}
+func TestConstFoldint32div(t *testing.T) {
+ var x, y, r int32
+ x = -2147483648
+ y = -2147483648
+ r = x / y
+ if r != 1 {
+ t.Errorf("-2147483648 %s -2147483648 = %d, want 1", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != 1 {
+ t.Errorf("-2147483648 %s -2147483647 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s -1 = %d, want -2147483648", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 1 = %d, want -2147483648", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 2147483647 = %d, want -1", "/", r)
+ }
+ x = -2147483647
+ y = -2147483648
+ r = x / y
+ if r != 0 {
+ t.Errorf("-2147483647 %s -2147483648 = %d, want 0", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != 1 {
+ t.Errorf("-2147483647 %s -2147483647 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 2147483647 {
+ t.Errorf("-2147483647 %s -1 = %d, want 2147483647", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 1 = %d, want -2147483647", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 2147483647 = %d, want -1", "/", r)
+ }
+ x = -1
+ y = -2147483648
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -2147483648 = %d, want 0", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -2147483647 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 2147483647 = %d, want 0", "/", r)
+ }
+ x = 0
+ y = -2147483648
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -2147483648 = %d, want 0", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -2147483647 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 2147483647 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = -2147483648
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -2147483648 = %d, want 0", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -2147483647 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 2147483647 = %d, want 0", "/", r)
+ }
+ x = 2147483647
+ y = -2147483648
+ r = x / y
+ if r != 0 {
+ t.Errorf("2147483647 %s -2147483648 = %d, want 0", "/", r)
+ }
+ y = -2147483647
+ r = x / y
+ if r != -1 {
+ t.Errorf("2147483647 %s -2147483647 = %d, want -1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -2147483647 {
+ t.Errorf("2147483647 %s -1 = %d, want -2147483647", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 1 = %d, want 2147483647", "/", r)
+ }
+ y = 2147483647
+ r = x / y
+ if r != 1 {
+ t.Errorf("2147483647 %s 2147483647 = %d, want 1", "/", r)
+ }
+}
+func TestConstFoldint32mul(t *testing.T) {
+ var x, y, r int32
+ x = -2147483648
+ y = -2147483648
+ r = x * y
+ if r != 0 {
+ t.Errorf("-2147483648 %s -2147483648 = %d, want 0", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s -2147483647 = %d, want -2147483648", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s -1 = %d, want -2147483648", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 1 = %d, want -2147483648", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 2147483647 = %d, want -2147483648", "*", r)
+ }
+ x = -2147483647
+ y = -2147483648
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-2147483647 %s -2147483648 = %d, want -2147483648", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != 1 {
+ t.Errorf("-2147483647 %s -2147483647 = %d, want 1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 2147483647 {
+ t.Errorf("-2147483647 %s -1 = %d, want 2147483647", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 1 = %d, want -2147483647", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 2147483647 = %d, want -1", "*", r)
+ }
+ x = -1
+ y = -2147483648
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("-1 %s -2147483648 = %d, want -2147483648", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != 2147483647 {
+ t.Errorf("-1 %s -2147483647 = %d, want 2147483647", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != -2147483647 {
+ t.Errorf("-1 %s 2147483647 = %d, want -2147483647", "*", r)
+ }
+ x = 0
+ y = -2147483648
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -2147483648 = %d, want 0", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -2147483647 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 2147483647 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = -2147483648
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("1 %s -2147483648 = %d, want -2147483648", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != -2147483647 {
+ t.Errorf("1 %s -2147483647 = %d, want -2147483647", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != 2147483647 {
+ t.Errorf("1 %s 2147483647 = %d, want 2147483647", "*", r)
+ }
+ x = 2147483647
+ y = -2147483648
+ r = x * y
+ if r != -2147483648 {
+ t.Errorf("2147483647 %s -2147483648 = %d, want -2147483648", "*", r)
+ }
+ y = -2147483647
+ r = x * y
+ if r != -1 {
+ t.Errorf("2147483647 %s -2147483647 = %d, want -1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -2147483647 {
+ t.Errorf("2147483647 %s -1 = %d, want -2147483647", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("2147483647 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 1 = %d, want 2147483647", "*", r)
+ }
+ y = 2147483647
+ r = x * y
+ if r != 1 {
+ t.Errorf("2147483647 %s 2147483647 = %d, want 1", "*", r)
+ }
+}
+func TestConstFoldint32mod(t *testing.T) {
+ var x, y, r int32
+ x = -2147483648
+ y = -2147483648
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483648 %s -2147483648 = %d, want 0", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != -1 {
+ t.Errorf("-2147483648 %s -2147483647 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483648 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 2147483647 = %d, want -1", "%", r)
+ }
+ x = -2147483647
+ y = -2147483648
+ r = x % y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s -2147483648 = %d, want -2147483647", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483647 %s -2147483647 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483647 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 2147483647 = %d, want 0", "%", r)
+ }
+ x = -1
+ y = -2147483648
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -2147483648 = %d, want -1", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -2147483647 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 2147483647 = %d, want -1", "%", r)
+ }
+ x = 0
+ y = -2147483648
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -2147483648 = %d, want 0", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -2147483647 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 2147483647 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = -2147483648
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -2147483648 = %d, want 1", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -2147483647 = %d, want 1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 2147483647 = %d, want 1", "%", r)
+ }
+ x = 2147483647
+ y = -2147483648
+ r = x % y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s -2147483648 = %d, want 2147483647", "%", r)
+ }
+ y = -2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("2147483647 %s -2147483647 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("2147483647 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("2147483647 %s 1 = %d, want 0", "%", r)
+ }
+ y = 2147483647
+ r = x % y
+ if r != 0 {
+ t.Errorf("2147483647 %s 2147483647 = %d, want 0", "%", r)
+ }
+}
+func TestConstFolduint16add(t *testing.T) {
+ var x, y, r uint16
+ x = 0
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 65535
+ r = x + y
+ if r != 65535 {
+ t.Errorf("0 %s 65535 = %d, want 65535", "+", r)
+ }
+ x = 1
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 65535
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "+", r)
+ }
+ x = 65535
+ y = 0
+ r = x + y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("65535 %s 1 = %d, want 0", "+", r)
+ }
+ y = 65535
+ r = x + y
+ if r != 65534 {
+ t.Errorf("65535 %s 65535 = %d, want 65534", "+", r)
+ }
+}
+func TestConstFolduint16sub(t *testing.T) {
+ var x, y, r uint16
+ x = 0
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 65535 {
+ t.Errorf("0 %s 1 = %d, want 65535", "-", r)
+ }
+ y = 65535
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s 65535 = %d, want 1", "-", r)
+ }
+ x = 1
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 65535
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s 65535 = %d, want 2", "-", r)
+ }
+ x = 65535
+ y = 0
+ r = x - y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 65534 {
+ t.Errorf("65535 %s 1 = %d, want 65534", "-", r)
+ }
+ y = 65535
+ r = x - y
+ if r != 0 {
+ t.Errorf("65535 %s 65535 = %d, want 0", "-", r)
+ }
+}
+func TestConstFolduint16div(t *testing.T) {
+ var x, y, r uint16
+ x = 0
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 65535
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 65535
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "/", r)
+ }
+ x = 65535
+ y = 1
+ r = x / y
+ if r != 65535 {
+ t.Errorf("65535 %s 1 = %d, want 65535", "/", r)
+ }
+ y = 65535
+ r = x / y
+ if r != 1 {
+ t.Errorf("65535 %s 65535 = %d, want 1", "/", r)
+ }
+}
+func TestConstFolduint16mul(t *testing.T) {
+ var x, y, r uint16
+ x = 0
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 65535
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 65535
+ r = x * y
+ if r != 65535 {
+ t.Errorf("1 %s 65535 = %d, want 65535", "*", r)
+ }
+ x = 65535
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("65535 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 65535 {
+ t.Errorf("65535 %s 1 = %d, want 65535", "*", r)
+ }
+ y = 65535
+ r = x * y
+ if r != 1 {
+ t.Errorf("65535 %s 65535 = %d, want 1", "*", r)
+ }
+}
+func TestConstFolduint16mod(t *testing.T) {
+ var x, y, r uint16
+ x = 0
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 65535
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 65535
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 65535 = %d, want 1", "%", r)
+ }
+ x = 65535
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("65535 %s 1 = %d, want 0", "%", r)
+ }
+ y = 65535
+ r = x % y
+ if r != 0 {
+ t.Errorf("65535 %s 65535 = %d, want 0", "%", r)
+ }
+}
+func TestConstFoldint16add(t *testing.T) {
+ var x, y, r int16
+ x = -32768
+ y = -32768
+ r = x + y
+ if r != 0 {
+ t.Errorf("-32768 %s -32768 = %d, want 0", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != 1 {
+ t.Errorf("-32768 %s -32767 = %d, want 1", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 32767 {
+ t.Errorf("-32768 %s -1 = %d, want 32767", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -32767 {
+ t.Errorf("-32768 %s 1 = %d, want -32767", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != -2 {
+ t.Errorf("-32768 %s 32766 = %d, want -2", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != -1 {
+ t.Errorf("-32768 %s 32767 = %d, want -1", "+", r)
+ }
+ x = -32767
+ y = -32768
+ r = x + y
+ if r != 1 {
+ t.Errorf("-32767 %s -32768 = %d, want 1", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != 2 {
+ t.Errorf("-32767 %s -32767 = %d, want 2", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -32768 {
+ t.Errorf("-32767 %s -1 = %d, want -32768", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -32766 {
+ t.Errorf("-32767 %s 1 = %d, want -32766", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != -1 {
+ t.Errorf("-32767 %s 32766 = %d, want -1", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != 0 {
+ t.Errorf("-32767 %s 32767 = %d, want 0", "+", r)
+ }
+ x = -1
+ y = -32768
+ r = x + y
+ if r != 32767 {
+ t.Errorf("-1 %s -32768 = %d, want 32767", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != -32768 {
+ t.Errorf("-1 %s -32767 = %d, want -32768", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -2 {
+ t.Errorf("-1 %s -1 = %d, want -2", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != 32765 {
+ t.Errorf("-1 %s 32766 = %d, want 32765", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != 32766 {
+ t.Errorf("-1 %s 32767 = %d, want 32766", "+", r)
+ }
+ x = 0
+ y = -32768
+ r = x + y
+ if r != -32768 {
+ t.Errorf("0 %s -32768 = %d, want -32768", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != -32767 {
+ t.Errorf("0 %s -32767 = %d, want -32767", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -1 {
+ t.Errorf("0 %s -1 = %d, want -1", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != 32766 {
+ t.Errorf("0 %s 32766 = %d, want 32766", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != 32767 {
+ t.Errorf("0 %s 32767 = %d, want 32767", "+", r)
+ }
+ x = 1
+ y = -32768
+ r = x + y
+ if r != -32767 {
+ t.Errorf("1 %s -32768 = %d, want -32767", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != -32766 {
+ t.Errorf("1 %s -32767 = %d, want -32766", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != 32767 {
+ t.Errorf("1 %s 32766 = %d, want 32767", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != -32768 {
+ t.Errorf("1 %s 32767 = %d, want -32768", "+", r)
+ }
+ x = 32766
+ y = -32768
+ r = x + y
+ if r != -2 {
+ t.Errorf("32766 %s -32768 = %d, want -2", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != -1 {
+ t.Errorf("32766 %s -32767 = %d, want -1", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 32765 {
+ t.Errorf("32766 %s -1 = %d, want 32765", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 32767 {
+ t.Errorf("32766 %s 1 = %d, want 32767", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != -4 {
+ t.Errorf("32766 %s 32766 = %d, want -4", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != -3 {
+ t.Errorf("32766 %s 32767 = %d, want -3", "+", r)
+ }
+ x = 32767
+ y = -32768
+ r = x + y
+ if r != -1 {
+ t.Errorf("32767 %s -32768 = %d, want -1", "+", r)
+ }
+ y = -32767
+ r = x + y
+ if r != 0 {
+ t.Errorf("32767 %s -32767 = %d, want 0", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 32766 {
+ t.Errorf("32767 %s -1 = %d, want 32766", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -32768 {
+ t.Errorf("32767 %s 1 = %d, want -32768", "+", r)
+ }
+ y = 32766
+ r = x + y
+ if r != -3 {
+ t.Errorf("32767 %s 32766 = %d, want -3", "+", r)
+ }
+ y = 32767
+ r = x + y
+ if r != -2 {
+ t.Errorf("32767 %s 32767 = %d, want -2", "+", r)
+ }
+}
+func TestConstFoldint16sub(t *testing.T) {
+ var x, y, r int16
+ x = -32768
+ y = -32768
+ r = x - y
+ if r != 0 {
+ t.Errorf("-32768 %s -32768 = %d, want 0", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != -1 {
+ t.Errorf("-32768 %s -32767 = %d, want -1", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -32767 {
+ t.Errorf("-32768 %s -1 = %d, want -32767", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 32767 {
+ t.Errorf("-32768 %s 1 = %d, want 32767", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != 2 {
+ t.Errorf("-32768 %s 32766 = %d, want 2", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != 1 {
+ t.Errorf("-32768 %s 32767 = %d, want 1", "-", r)
+ }
+ x = -32767
+ y = -32768
+ r = x - y
+ if r != 1 {
+ t.Errorf("-32767 %s -32768 = %d, want 1", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != 0 {
+ t.Errorf("-32767 %s -32767 = %d, want 0", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -32766 {
+ t.Errorf("-32767 %s -1 = %d, want -32766", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -32768 {
+ t.Errorf("-32767 %s 1 = %d, want -32768", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != 3 {
+ t.Errorf("-32767 %s 32766 = %d, want 3", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != 2 {
+ t.Errorf("-32767 %s 32767 = %d, want 2", "-", r)
+ }
+ x = -1
+ y = -32768
+ r = x - y
+ if r != 32767 {
+ t.Errorf("-1 %s -32768 = %d, want 32767", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != 32766 {
+ t.Errorf("-1 %s -32767 = %d, want 32766", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != -32767 {
+ t.Errorf("-1 %s 32766 = %d, want -32767", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != -32768 {
+ t.Errorf("-1 %s 32767 = %d, want -32768", "-", r)
+ }
+ x = 0
+ y = -32768
+ r = x - y
+ if r != -32768 {
+ t.Errorf("0 %s -32768 = %d, want -32768", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != 32767 {
+ t.Errorf("0 %s -32767 = %d, want 32767", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s -1 = %d, want 1", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -1 {
+ t.Errorf("0 %s 1 = %d, want -1", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != -32766 {
+ t.Errorf("0 %s 32766 = %d, want -32766", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != -32767 {
+ t.Errorf("0 %s 32767 = %d, want -32767", "-", r)
+ }
+ x = 1
+ y = -32768
+ r = x - y
+ if r != -32767 {
+ t.Errorf("1 %s -32768 = %d, want -32767", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != -32768 {
+ t.Errorf("1 %s -32767 = %d, want -32768", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s -1 = %d, want 2", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != -32765 {
+ t.Errorf("1 %s 32766 = %d, want -32765", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != -32766 {
+ t.Errorf("1 %s 32767 = %d, want -32766", "-", r)
+ }
+ x = 32766
+ y = -32768
+ r = x - y
+ if r != -2 {
+ t.Errorf("32766 %s -32768 = %d, want -2", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != -3 {
+ t.Errorf("32766 %s -32767 = %d, want -3", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 32767 {
+ t.Errorf("32766 %s -1 = %d, want 32767", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 32765 {
+ t.Errorf("32766 %s 1 = %d, want 32765", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != 0 {
+ t.Errorf("32766 %s 32766 = %d, want 0", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != -1 {
+ t.Errorf("32766 %s 32767 = %d, want -1", "-", r)
+ }
+ x = 32767
+ y = -32768
+ r = x - y
+ if r != -1 {
+ t.Errorf("32767 %s -32768 = %d, want -1", "-", r)
+ }
+ y = -32767
+ r = x - y
+ if r != -2 {
+ t.Errorf("32767 %s -32767 = %d, want -2", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -32768 {
+ t.Errorf("32767 %s -1 = %d, want -32768", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 32766 {
+ t.Errorf("32767 %s 1 = %d, want 32766", "-", r)
+ }
+ y = 32766
+ r = x - y
+ if r != 1 {
+ t.Errorf("32767 %s 32766 = %d, want 1", "-", r)
+ }
+ y = 32767
+ r = x - y
+ if r != 0 {
+ t.Errorf("32767 %s 32767 = %d, want 0", "-", r)
+ }
+}
+func TestConstFoldint16div(t *testing.T) {
+ var x, y, r int16
+ x = -32768
+ y = -32768
+ r = x / y
+ if r != 1 {
+ t.Errorf("-32768 %s -32768 = %d, want 1", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 1 {
+ t.Errorf("-32768 %s -32767 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -32768 {
+ t.Errorf("-32768 %s -1 = %d, want -32768", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -32768 {
+ t.Errorf("-32768 %s 1 = %d, want -32768", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != -1 {
+ t.Errorf("-32768 %s 32766 = %d, want -1", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != -1 {
+ t.Errorf("-32768 %s 32767 = %d, want -1", "/", r)
+ }
+ x = -32767
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("-32767 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 1 {
+ t.Errorf("-32767 %s -32767 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 32767 {
+ t.Errorf("-32767 %s -1 = %d, want 32767", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -32767 {
+ t.Errorf("-32767 %s 1 = %d, want -32767", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != -1 {
+ t.Errorf("-32767 %s 32766 = %d, want -1", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != -1 {
+ t.Errorf("-32767 %s 32767 = %d, want -1", "/", r)
+ }
+ x = -1
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -32767 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 32766 = %d, want 0", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 32767 = %d, want 0", "/", r)
+ }
+ x = 0
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -32767 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 32766 = %d, want 0", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 32767 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -32767 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 32766 = %d, want 0", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 32767 = %d, want 0", "/", r)
+ }
+ x = 32766
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("32766 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("32766 %s -32767 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -32766 {
+ t.Errorf("32766 %s -1 = %d, want -32766", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 32766 {
+ t.Errorf("32766 %s 1 = %d, want 32766", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != 1 {
+ t.Errorf("32766 %s 32766 = %d, want 1", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != 0 {
+ t.Errorf("32766 %s 32767 = %d, want 0", "/", r)
+ }
+ x = 32767
+ y = -32768
+ r = x / y
+ if r != 0 {
+ t.Errorf("32767 %s -32768 = %d, want 0", "/", r)
+ }
+ y = -32767
+ r = x / y
+ if r != -1 {
+ t.Errorf("32767 %s -32767 = %d, want -1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -32767 {
+ t.Errorf("32767 %s -1 = %d, want -32767", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 32767 {
+ t.Errorf("32767 %s 1 = %d, want 32767", "/", r)
+ }
+ y = 32766
+ r = x / y
+ if r != 1 {
+ t.Errorf("32767 %s 32766 = %d, want 1", "/", r)
+ }
+ y = 32767
+ r = x / y
+ if r != 1 {
+ t.Errorf("32767 %s 32767 = %d, want 1", "/", r)
+ }
+}
+func TestConstFoldint16mul(t *testing.T) {
+ var x, y, r int16
+ x = -32768
+ y = -32768
+ r = x * y
+ if r != 0 {
+ t.Errorf("-32768 %s -32768 = %d, want 0", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-32768 %s -32767 = %d, want -32768", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-32768 %s -1 = %d, want -32768", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-32768 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-32768 %s 1 = %d, want -32768", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != 0 {
+ t.Errorf("-32768 %s 32766 = %d, want 0", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-32768 %s 32767 = %d, want -32768", "*", r)
+ }
+ x = -32767
+ y = -32768
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-32767 %s -32768 = %d, want -32768", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != 1 {
+ t.Errorf("-32767 %s -32767 = %d, want 1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 32767 {
+ t.Errorf("-32767 %s -1 = %d, want 32767", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-32767 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -32767 {
+ t.Errorf("-32767 %s 1 = %d, want -32767", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != 32766 {
+ t.Errorf("-32767 %s 32766 = %d, want 32766", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != -1 {
+ t.Errorf("-32767 %s 32767 = %d, want -1", "*", r)
+ }
+ x = -1
+ y = -32768
+ r = x * y
+ if r != -32768 {
+ t.Errorf("-1 %s -32768 = %d, want -32768", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != 32767 {
+ t.Errorf("-1 %s -32767 = %d, want 32767", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != -32766 {
+ t.Errorf("-1 %s 32766 = %d, want -32766", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != -32767 {
+ t.Errorf("-1 %s 32767 = %d, want -32767", "*", r)
+ }
+ x = 0
+ y = -32768
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -32768 = %d, want 0", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -32767 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 32766 = %d, want 0", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 32767 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = -32768
+ r = x * y
+ if r != -32768 {
+ t.Errorf("1 %s -32768 = %d, want -32768", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != -32767 {
+ t.Errorf("1 %s -32767 = %d, want -32767", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != 32766 {
+ t.Errorf("1 %s 32766 = %d, want 32766", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != 32767 {
+ t.Errorf("1 %s 32767 = %d, want 32767", "*", r)
+ }
+ x = 32766
+ y = -32768
+ r = x * y
+ if r != 0 {
+ t.Errorf("32766 %s -32768 = %d, want 0", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != 32766 {
+ t.Errorf("32766 %s -32767 = %d, want 32766", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -32766 {
+ t.Errorf("32766 %s -1 = %d, want -32766", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("32766 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 32766 {
+ t.Errorf("32766 %s 1 = %d, want 32766", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != 4 {
+ t.Errorf("32766 %s 32766 = %d, want 4", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != -32766 {
+ t.Errorf("32766 %s 32767 = %d, want -32766", "*", r)
+ }
+ x = 32767
+ y = -32768
+ r = x * y
+ if r != -32768 {
+ t.Errorf("32767 %s -32768 = %d, want -32768", "*", r)
+ }
+ y = -32767
+ r = x * y
+ if r != -1 {
+ t.Errorf("32767 %s -32767 = %d, want -1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -32767 {
+ t.Errorf("32767 %s -1 = %d, want -32767", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("32767 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 32767 {
+ t.Errorf("32767 %s 1 = %d, want 32767", "*", r)
+ }
+ y = 32766
+ r = x * y
+ if r != -32766 {
+ t.Errorf("32767 %s 32766 = %d, want -32766", "*", r)
+ }
+ y = 32767
+ r = x * y
+ if r != 1 {
+ t.Errorf("32767 %s 32767 = %d, want 1", "*", r)
+ }
+}
+func TestConstFoldint16mod(t *testing.T) {
+ var x, y, r int16
+ x = -32768
+ y = -32768
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32768 %s -32768 = %d, want 0", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != -1 {
+ t.Errorf("-32768 %s -32767 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32768 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32768 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != -2 {
+ t.Errorf("-32768 %s 32766 = %d, want -2", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != -1 {
+ t.Errorf("-32768 %s 32767 = %d, want -1", "%", r)
+ }
+ x = -32767
+ y = -32768
+ r = x % y
+ if r != -32767 {
+ t.Errorf("-32767 %s -32768 = %d, want -32767", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32767 %s -32767 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32767 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32767 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != -1 {
+ t.Errorf("-32767 %s 32766 = %d, want -1", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("-32767 %s 32767 = %d, want 0", "%", r)
+ }
+ x = -1
+ y = -32768
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -32768 = %d, want -1", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -32767 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 32766 = %d, want -1", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 32767 = %d, want -1", "%", r)
+ }
+ x = 0
+ y = -32768
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -32768 = %d, want 0", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -32767 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 32766 = %d, want 0", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 32767 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = -32768
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -32768 = %d, want 1", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -32767 = %d, want 1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 32766 = %d, want 1", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 32767 = %d, want 1", "%", r)
+ }
+ x = 32766
+ y = -32768
+ r = x % y
+ if r != 32766 {
+ t.Errorf("32766 %s -32768 = %d, want 32766", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != 32766 {
+ t.Errorf("32766 %s -32767 = %d, want 32766", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("32766 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("32766 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != 0 {
+ t.Errorf("32766 %s 32766 = %d, want 0", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != 32766 {
+ t.Errorf("32766 %s 32767 = %d, want 32766", "%", r)
+ }
+ x = 32767
+ y = -32768
+ r = x % y
+ if r != 32767 {
+ t.Errorf("32767 %s -32768 = %d, want 32767", "%", r)
+ }
+ y = -32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("32767 %s -32767 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("32767 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("32767 %s 1 = %d, want 0", "%", r)
+ }
+ y = 32766
+ r = x % y
+ if r != 1 {
+ t.Errorf("32767 %s 32766 = %d, want 1", "%", r)
+ }
+ y = 32767
+ r = x % y
+ if r != 0 {
+ t.Errorf("32767 %s 32767 = %d, want 0", "%", r)
+ }
+}
+func TestConstFolduint8add(t *testing.T) {
+ var x, y, r uint8
+ x = 0
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 255
+ r = x + y
+ if r != 255 {
+ t.Errorf("0 %s 255 = %d, want 255", "+", r)
+ }
+ x = 1
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 255
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "+", r)
+ }
+ x = 255
+ y = 0
+ r = x + y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("255 %s 1 = %d, want 0", "+", r)
+ }
+ y = 255
+ r = x + y
+ if r != 254 {
+ t.Errorf("255 %s 255 = %d, want 254", "+", r)
+ }
+}
+func TestConstFolduint8sub(t *testing.T) {
+ var x, y, r uint8
+ x = 0
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 255 {
+ t.Errorf("0 %s 1 = %d, want 255", "-", r)
+ }
+ y = 255
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s 255 = %d, want 1", "-", r)
+ }
+ x = 1
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 255
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s 255 = %d, want 2", "-", r)
+ }
+ x = 255
+ y = 0
+ r = x - y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 254 {
+ t.Errorf("255 %s 1 = %d, want 254", "-", r)
+ }
+ y = 255
+ r = x - y
+ if r != 0 {
+ t.Errorf("255 %s 255 = %d, want 0", "-", r)
+ }
+}
+func TestConstFolduint8div(t *testing.T) {
+ var x, y, r uint8
+ x = 0
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 255
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 255
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "/", r)
+ }
+ x = 255
+ y = 1
+ r = x / y
+ if r != 255 {
+ t.Errorf("255 %s 1 = %d, want 255", "/", r)
+ }
+ y = 255
+ r = x / y
+ if r != 1 {
+ t.Errorf("255 %s 255 = %d, want 1", "/", r)
+ }
+}
+func TestConstFolduint8mul(t *testing.T) {
+ var x, y, r uint8
+ x = 0
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 255
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 255
+ r = x * y
+ if r != 255 {
+ t.Errorf("1 %s 255 = %d, want 255", "*", r)
+ }
+ x = 255
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("255 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 255 {
+ t.Errorf("255 %s 1 = %d, want 255", "*", r)
+ }
+ y = 255
+ r = x * y
+ if r != 1 {
+ t.Errorf("255 %s 255 = %d, want 1", "*", r)
+ }
+}
+func TestConstFolduint8mod(t *testing.T) {
+ var x, y, r uint8
+ x = 0
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 255
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 255
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 255 = %d, want 1", "%", r)
+ }
+ x = 255
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("255 %s 1 = %d, want 0", "%", r)
+ }
+ y = 255
+ r = x % y
+ if r != 0 {
+ t.Errorf("255 %s 255 = %d, want 0", "%", r)
+ }
+}
+func TestConstFoldint8add(t *testing.T) {
+ var x, y, r int8
+ x = -128
+ y = -128
+ r = x + y
+ if r != 0 {
+ t.Errorf("-128 %s -128 = %d, want 0", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != 1 {
+ t.Errorf("-128 %s -127 = %d, want 1", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 127 {
+ t.Errorf("-128 %s -1 = %d, want 127", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -127 {
+ t.Errorf("-128 %s 1 = %d, want -127", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != -2 {
+ t.Errorf("-128 %s 126 = %d, want -2", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != -1 {
+ t.Errorf("-128 %s 127 = %d, want -1", "+", r)
+ }
+ x = -127
+ y = -128
+ r = x + y
+ if r != 1 {
+ t.Errorf("-127 %s -128 = %d, want 1", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != 2 {
+ t.Errorf("-127 %s -127 = %d, want 2", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -128 {
+ t.Errorf("-127 %s -1 = %d, want -128", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -126 {
+ t.Errorf("-127 %s 1 = %d, want -126", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != -1 {
+ t.Errorf("-127 %s 126 = %d, want -1", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != 0 {
+ t.Errorf("-127 %s 127 = %d, want 0", "+", r)
+ }
+ x = -1
+ y = -128
+ r = x + y
+ if r != 127 {
+ t.Errorf("-1 %s -128 = %d, want 127", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != -128 {
+ t.Errorf("-1 %s -127 = %d, want -128", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -2 {
+ t.Errorf("-1 %s -1 = %d, want -2", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != 125 {
+ t.Errorf("-1 %s 126 = %d, want 125", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != 126 {
+ t.Errorf("-1 %s 127 = %d, want 126", "+", r)
+ }
+ x = 0
+ y = -128
+ r = x + y
+ if r != -128 {
+ t.Errorf("0 %s -128 = %d, want -128", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != -127 {
+ t.Errorf("0 %s -127 = %d, want -127", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != -1 {
+ t.Errorf("0 %s -1 = %d, want -1", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 1 {
+ t.Errorf("0 %s 1 = %d, want 1", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != 126 {
+ t.Errorf("0 %s 126 = %d, want 126", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != 127 {
+ t.Errorf("0 %s 127 = %d, want 127", "+", r)
+ }
+ x = 1
+ y = -128
+ r = x + y
+ if r != -127 {
+ t.Errorf("1 %s -128 = %d, want -127", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != -126 {
+ t.Errorf("1 %s -127 = %d, want -126", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != 127 {
+ t.Errorf("1 %s 126 = %d, want 127", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != -128 {
+ t.Errorf("1 %s 127 = %d, want -128", "+", r)
+ }
+ x = 126
+ y = -128
+ r = x + y
+ if r != -2 {
+ t.Errorf("126 %s -128 = %d, want -2", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != -1 {
+ t.Errorf("126 %s -127 = %d, want -1", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 125 {
+ t.Errorf("126 %s -1 = %d, want 125", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != 127 {
+ t.Errorf("126 %s 1 = %d, want 127", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != -4 {
+ t.Errorf("126 %s 126 = %d, want -4", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != -3 {
+ t.Errorf("126 %s 127 = %d, want -3", "+", r)
+ }
+ x = 127
+ y = -128
+ r = x + y
+ if r != -1 {
+ t.Errorf("127 %s -128 = %d, want -1", "+", r)
+ }
+ y = -127
+ r = x + y
+ if r != 0 {
+ t.Errorf("127 %s -127 = %d, want 0", "+", r)
+ }
+ y = -1
+ r = x + y
+ if r != 126 {
+ t.Errorf("127 %s -1 = %d, want 126", "+", r)
+ }
+ y = 0
+ r = x + y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "+", r)
+ }
+ y = 1
+ r = x + y
+ if r != -128 {
+ t.Errorf("127 %s 1 = %d, want -128", "+", r)
+ }
+ y = 126
+ r = x + y
+ if r != -3 {
+ t.Errorf("127 %s 126 = %d, want -3", "+", r)
+ }
+ y = 127
+ r = x + y
+ if r != -2 {
+ t.Errorf("127 %s 127 = %d, want -2", "+", r)
+ }
+}
+func TestConstFoldint8sub(t *testing.T) {
+ var x, y, r int8
+ x = -128
+ y = -128
+ r = x - y
+ if r != 0 {
+ t.Errorf("-128 %s -128 = %d, want 0", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != -1 {
+ t.Errorf("-128 %s -127 = %d, want -1", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -127 {
+ t.Errorf("-128 %s -1 = %d, want -127", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 127 {
+ t.Errorf("-128 %s 1 = %d, want 127", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != 2 {
+ t.Errorf("-128 %s 126 = %d, want 2", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != 1 {
+ t.Errorf("-128 %s 127 = %d, want 1", "-", r)
+ }
+ x = -127
+ y = -128
+ r = x - y
+ if r != 1 {
+ t.Errorf("-127 %s -128 = %d, want 1", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != 0 {
+ t.Errorf("-127 %s -127 = %d, want 0", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -126 {
+ t.Errorf("-127 %s -1 = %d, want -126", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -128 {
+ t.Errorf("-127 %s 1 = %d, want -128", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != 3 {
+ t.Errorf("-127 %s 126 = %d, want 3", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != 2 {
+ t.Errorf("-127 %s 127 = %d, want 2", "-", r)
+ }
+ x = -1
+ y = -128
+ r = x - y
+ if r != 127 {
+ t.Errorf("-1 %s -128 = %d, want 127", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != 126 {
+ t.Errorf("-1 %s -127 = %d, want 126", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != -127 {
+ t.Errorf("-1 %s 126 = %d, want -127", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != -128 {
+ t.Errorf("-1 %s 127 = %d, want -128", "-", r)
+ }
+ x = 0
+ y = -128
+ r = x - y
+ if r != -128 {
+ t.Errorf("0 %s -128 = %d, want -128", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != 127 {
+ t.Errorf("0 %s -127 = %d, want 127", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 1 {
+ t.Errorf("0 %s -1 = %d, want 1", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != -1 {
+ t.Errorf("0 %s 1 = %d, want -1", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != -126 {
+ t.Errorf("0 %s 126 = %d, want -126", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != -127 {
+ t.Errorf("0 %s 127 = %d, want -127", "-", r)
+ }
+ x = 1
+ y = -128
+ r = x - y
+ if r != -127 {
+ t.Errorf("1 %s -128 = %d, want -127", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != -128 {
+ t.Errorf("1 %s -127 = %d, want -128", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 2 {
+ t.Errorf("1 %s -1 = %d, want 2", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != -125 {
+ t.Errorf("1 %s 126 = %d, want -125", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != -126 {
+ t.Errorf("1 %s 127 = %d, want -126", "-", r)
+ }
+ x = 126
+ y = -128
+ r = x - y
+ if r != -2 {
+ t.Errorf("126 %s -128 = %d, want -2", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != -3 {
+ t.Errorf("126 %s -127 = %d, want -3", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != 127 {
+ t.Errorf("126 %s -1 = %d, want 127", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 125 {
+ t.Errorf("126 %s 1 = %d, want 125", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != 0 {
+ t.Errorf("126 %s 126 = %d, want 0", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != -1 {
+ t.Errorf("126 %s 127 = %d, want -1", "-", r)
+ }
+ x = 127
+ y = -128
+ r = x - y
+ if r != -1 {
+ t.Errorf("127 %s -128 = %d, want -1", "-", r)
+ }
+ y = -127
+ r = x - y
+ if r != -2 {
+ t.Errorf("127 %s -127 = %d, want -2", "-", r)
+ }
+ y = -1
+ r = x - y
+ if r != -128 {
+ t.Errorf("127 %s -1 = %d, want -128", "-", r)
+ }
+ y = 0
+ r = x - y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "-", r)
+ }
+ y = 1
+ r = x - y
+ if r != 126 {
+ t.Errorf("127 %s 1 = %d, want 126", "-", r)
+ }
+ y = 126
+ r = x - y
+ if r != 1 {
+ t.Errorf("127 %s 126 = %d, want 1", "-", r)
+ }
+ y = 127
+ r = x - y
+ if r != 0 {
+ t.Errorf("127 %s 127 = %d, want 0", "-", r)
+ }
+}
+func TestConstFoldint8div(t *testing.T) {
+ var x, y, r int8
+ x = -128
+ y = -128
+ r = x / y
+ if r != 1 {
+ t.Errorf("-128 %s -128 = %d, want 1", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 1 {
+ t.Errorf("-128 %s -127 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -128 {
+ t.Errorf("-128 %s -1 = %d, want -128", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -128 {
+ t.Errorf("-128 %s 1 = %d, want -128", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != -1 {
+ t.Errorf("-128 %s 126 = %d, want -1", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != -1 {
+ t.Errorf("-128 %s 127 = %d, want -1", "/", r)
+ }
+ x = -127
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("-127 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 1 {
+ t.Errorf("-127 %s -127 = %d, want 1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 127 {
+ t.Errorf("-127 %s -1 = %d, want 127", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -127 {
+ t.Errorf("-127 %s 1 = %d, want -127", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != -1 {
+ t.Errorf("-127 %s 126 = %d, want -1", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != -1 {
+ t.Errorf("-127 %s 127 = %d, want -1", "/", r)
+ }
+ x = -1
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s -127 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 126 = %d, want 0", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != 0 {
+ t.Errorf("-1 %s 127 = %d, want 0", "/", r)
+ }
+ x = 0
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -127 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 126 = %d, want 0", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != 0 {
+ t.Errorf("0 %s 127 = %d, want 0", "/", r)
+ }
+ x = 1
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s -127 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 126 = %d, want 0", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != 0 {
+ t.Errorf("1 %s 127 = %d, want 0", "/", r)
+ }
+ x = 126
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("126 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != 0 {
+ t.Errorf("126 %s -127 = %d, want 0", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -126 {
+ t.Errorf("126 %s -1 = %d, want -126", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 126 {
+ t.Errorf("126 %s 1 = %d, want 126", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != 1 {
+ t.Errorf("126 %s 126 = %d, want 1", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != 0 {
+ t.Errorf("126 %s 127 = %d, want 0", "/", r)
+ }
+ x = 127
+ y = -128
+ r = x / y
+ if r != 0 {
+ t.Errorf("127 %s -128 = %d, want 0", "/", r)
+ }
+ y = -127
+ r = x / y
+ if r != -1 {
+ t.Errorf("127 %s -127 = %d, want -1", "/", r)
+ }
+ y = -1
+ r = x / y
+ if r != -127 {
+ t.Errorf("127 %s -1 = %d, want -127", "/", r)
+ }
+ y = 1
+ r = x / y
+ if r != 127 {
+ t.Errorf("127 %s 1 = %d, want 127", "/", r)
+ }
+ y = 126
+ r = x / y
+ if r != 1 {
+ t.Errorf("127 %s 126 = %d, want 1", "/", r)
+ }
+ y = 127
+ r = x / y
+ if r != 1 {
+ t.Errorf("127 %s 127 = %d, want 1", "/", r)
+ }
+}
+func TestConstFoldint8mul(t *testing.T) {
+ var x, y, r int8
+ x = -128
+ y = -128
+ r = x * y
+ if r != 0 {
+ t.Errorf("-128 %s -128 = %d, want 0", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != -128 {
+ t.Errorf("-128 %s -127 = %d, want -128", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -128 {
+ t.Errorf("-128 %s -1 = %d, want -128", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-128 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -128 {
+ t.Errorf("-128 %s 1 = %d, want -128", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != 0 {
+ t.Errorf("-128 %s 126 = %d, want 0", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != -128 {
+ t.Errorf("-128 %s 127 = %d, want -128", "*", r)
+ }
+ x = -127
+ y = -128
+ r = x * y
+ if r != -128 {
+ t.Errorf("-127 %s -128 = %d, want -128", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != 1 {
+ t.Errorf("-127 %s -127 = %d, want 1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 127 {
+ t.Errorf("-127 %s -1 = %d, want 127", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-127 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -127 {
+ t.Errorf("-127 %s 1 = %d, want -127", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != 126 {
+ t.Errorf("-127 %s 126 = %d, want 126", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != -1 {
+ t.Errorf("-127 %s 127 = %d, want -1", "*", r)
+ }
+ x = -1
+ y = -128
+ r = x * y
+ if r != -128 {
+ t.Errorf("-1 %s -128 = %d, want -128", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != 127 {
+ t.Errorf("-1 %s -127 = %d, want 127", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 1 {
+ t.Errorf("-1 %s -1 = %d, want 1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("-1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != -126 {
+ t.Errorf("-1 %s 126 = %d, want -126", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != -127 {
+ t.Errorf("-1 %s 127 = %d, want -127", "*", r)
+ }
+ x = 0
+ y = -128
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -128 = %d, want 0", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -127 = %d, want 0", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 126 = %d, want 0", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != 0 {
+ t.Errorf("0 %s 127 = %d, want 0", "*", r)
+ }
+ x = 1
+ y = -128
+ r = x * y
+ if r != -128 {
+ t.Errorf("1 %s -128 = %d, want -128", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != -127 {
+ t.Errorf("1 %s -127 = %d, want -127", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -1 {
+ t.Errorf("1 %s -1 = %d, want -1", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("1 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 1 {
+ t.Errorf("1 %s 1 = %d, want 1", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != 126 {
+ t.Errorf("1 %s 126 = %d, want 126", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != 127 {
+ t.Errorf("1 %s 127 = %d, want 127", "*", r)
+ }
+ x = 126
+ y = -128
+ r = x * y
+ if r != 0 {
+ t.Errorf("126 %s -128 = %d, want 0", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != 126 {
+ t.Errorf("126 %s -127 = %d, want 126", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -126 {
+ t.Errorf("126 %s -1 = %d, want -126", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("126 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 126 {
+ t.Errorf("126 %s 1 = %d, want 126", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != 4 {
+ t.Errorf("126 %s 126 = %d, want 4", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != -126 {
+ t.Errorf("126 %s 127 = %d, want -126", "*", r)
+ }
+ x = 127
+ y = -128
+ r = x * y
+ if r != -128 {
+ t.Errorf("127 %s -128 = %d, want -128", "*", r)
+ }
+ y = -127
+ r = x * y
+ if r != -1 {
+ t.Errorf("127 %s -127 = %d, want -1", "*", r)
+ }
+ y = -1
+ r = x * y
+ if r != -127 {
+ t.Errorf("127 %s -1 = %d, want -127", "*", r)
+ }
+ y = 0
+ r = x * y
+ if r != 0 {
+ t.Errorf("127 %s 0 = %d, want 0", "*", r)
+ }
+ y = 1
+ r = x * y
+ if r != 127 {
+ t.Errorf("127 %s 1 = %d, want 127", "*", r)
+ }
+ y = 126
+ r = x * y
+ if r != -126 {
+ t.Errorf("127 %s 126 = %d, want -126", "*", r)
+ }
+ y = 127
+ r = x * y
+ if r != 1 {
+ t.Errorf("127 %s 127 = %d, want 1", "*", r)
+ }
+}
+func TestConstFoldint8mod(t *testing.T) {
+ var x, y, r int8
+ x = -128
+ y = -128
+ r = x % y
+ if r != 0 {
+ t.Errorf("-128 %s -128 = %d, want 0", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != -1 {
+ t.Errorf("-128 %s -127 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-128 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-128 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != -2 {
+ t.Errorf("-128 %s 126 = %d, want -2", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != -1 {
+ t.Errorf("-128 %s 127 = %d, want -1", "%", r)
+ }
+ x = -127
+ y = -128
+ r = x % y
+ if r != -127 {
+ t.Errorf("-127 %s -128 = %d, want -127", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != 0 {
+ t.Errorf("-127 %s -127 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-127 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-127 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != -1 {
+ t.Errorf("-127 %s 126 = %d, want -1", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != 0 {
+ t.Errorf("-127 %s 127 = %d, want 0", "%", r)
+ }
+ x = -1
+ y = -128
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -128 = %d, want -1", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s -127 = %d, want -1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("-1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 126 = %d, want -1", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != -1 {
+ t.Errorf("-1 %s 127 = %d, want -1", "%", r)
+ }
+ x = 0
+ y = -128
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -128 = %d, want 0", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -127 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 126 = %d, want 0", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != 0 {
+ t.Errorf("0 %s 127 = %d, want 0", "%", r)
+ }
+ x = 1
+ y = -128
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -128 = %d, want 1", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s -127 = %d, want 1", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 126 = %d, want 1", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != 1 {
+ t.Errorf("1 %s 127 = %d, want 1", "%", r)
+ }
+ x = 126
+ y = -128
+ r = x % y
+ if r != 126 {
+ t.Errorf("126 %s -128 = %d, want 126", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != 126 {
+ t.Errorf("126 %s -127 = %d, want 126", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("126 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("126 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != 0 {
+ t.Errorf("126 %s 126 = %d, want 0", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != 126 {
+ t.Errorf("126 %s 127 = %d, want 126", "%", r)
+ }
+ x = 127
+ y = -128
+ r = x % y
+ if r != 127 {
+ t.Errorf("127 %s -128 = %d, want 127", "%", r)
+ }
+ y = -127
+ r = x % y
+ if r != 0 {
+ t.Errorf("127 %s -127 = %d, want 0", "%", r)
+ }
+ y = -1
+ r = x % y
+ if r != 0 {
+ t.Errorf("127 %s -1 = %d, want 0", "%", r)
+ }
+ y = 1
+ r = x % y
+ if r != 0 {
+ t.Errorf("127 %s 1 = %d, want 0", "%", r)
+ }
+ y = 126
+ r = x % y
+ if r != 1 {
+ t.Errorf("127 %s 126 = %d, want 1", "%", r)
+ }
+ y = 127
+ r = x % y
+ if r != 0 {
+ t.Errorf("127 %s 127 = %d, want 0", "%", r)
+ }
+}
+func TestConstFolduint64uint64lsh(t *testing.T) {
+ var x, r uint64
+ var y uint64
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x << y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551614", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint64uint64rsh(t *testing.T) {
+ var x, r uint64
+ var y uint64
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x >> y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint64uint32lsh(t *testing.T) {
+ var x, r uint64
+ var y uint32
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x << y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551614", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint64uint32rsh(t *testing.T) {
+ var x, r uint64
+ var y uint32
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x >> y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint64uint16lsh(t *testing.T) {
+ var x, r uint64
+ var y uint16
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x << y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551614", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint64uint16rsh(t *testing.T) {
+ var x, r uint64
+ var y uint16
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x >> y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint64uint8lsh(t *testing.T) {
+ var x, r uint64
+ var y uint8
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x << y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 18446744073709551614 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 18446744073709551614", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint64uint8rsh(t *testing.T) {
+ var x, r uint64
+ var y uint8
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 18446744073709551615
+ y = 0
+ r = x >> y
+ if r != 18446744073709551615 {
+ t.Errorf("18446744073709551615 %s 0 = %d, want 18446744073709551615", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("18446744073709551615 %s 1 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("18446744073709551615 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint64uint64lsh(t *testing.T) {
+ var x, r int64
+ var y uint64
+ x = -9223372036854775808
+ y = 0
+ r = x << y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x << y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x << y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s 1 = %d, want -8589934592", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x << y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x << y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint64uint64rsh(t *testing.T) {
+ var x, r int64
+ var y uint64
+ x = -9223372036854775808
+ y = 0
+ r = x >> y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x >> y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x >> y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-4294967296 %s 1 = %d, want -2147483648", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x >> y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint64uint32lsh(t *testing.T) {
+ var x, r int64
+ var y uint32
+ x = -9223372036854775808
+ y = 0
+ r = x << y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x << y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x << y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s 1 = %d, want -8589934592", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x << y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x << y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint64uint32rsh(t *testing.T) {
+ var x, r int64
+ var y uint32
+ x = -9223372036854775808
+ y = 0
+ r = x >> y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x >> y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x >> y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-4294967296 %s 1 = %d, want -2147483648", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x >> y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint64uint16lsh(t *testing.T) {
+ var x, r int64
+ var y uint16
+ x = -9223372036854775808
+ y = 0
+ r = x << y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x << y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x << y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s 1 = %d, want -8589934592", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x << y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x << y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint64uint16rsh(t *testing.T) {
+ var x, r int64
+ var y uint16
+ x = -9223372036854775808
+ y = 0
+ r = x >> y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x >> y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x >> y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-4294967296 %s 1 = %d, want -2147483648", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x >> y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint64uint8lsh(t *testing.T) {
+ var x, r int64
+ var y uint8
+ x = -9223372036854775808
+ y = 0
+ r = x << y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775808 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x << y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-9223372036854775807 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x << y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -8589934592 {
+ t.Errorf("-4294967296 %s 1 = %d, want -8589934592", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-4294967296 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x << y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 8589934592 {
+ t.Errorf("4294967296 %s 1 = %d, want 8589934592", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967296 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x << y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x << y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint64uint8rsh(t *testing.T) {
+ var x, r int64
+ var y uint8
+ x = -9223372036854775808
+ y = 0
+ r = x >> y
+ if r != -9223372036854775808 {
+ t.Errorf("-9223372036854775808 %s 0 = %d, want -9223372036854775808", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775808 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775808 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -9223372036854775807
+ y = 0
+ r = x >> y
+ if r != -9223372036854775807 {
+ t.Errorf("-9223372036854775807 %s 0 = %d, want -9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -4611686018427387904 {
+ t.Errorf("-9223372036854775807 %s 1 = %d, want -4611686018427387904", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-9223372036854775807 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -4294967296
+ y = 0
+ r = x >> y
+ if r != -4294967296 {
+ t.Errorf("-4294967296 %s 0 = %d, want -4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-4294967296 %s 1 = %d, want -2147483648", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-4294967296 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 255 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 4294967296
+ y = 0
+ r = x >> y
+ if r != 4294967296 {
+ t.Errorf("4294967296 %s 0 = %d, want 4294967296", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483648 {
+ t.Errorf("4294967296 %s 1 = %d, want 2147483648", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967296 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775806
+ y = 0
+ r = x >> y
+ if r != 9223372036854775806 {
+ t.Errorf("9223372036854775806 %s 0 = %d, want 9223372036854775806", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775806 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775806 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 9223372036854775807
+ y = 0
+ r = x >> y
+ if r != 9223372036854775807 {
+ t.Errorf("9223372036854775807 %s 0 = %d, want 9223372036854775807", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 4611686018427387903 {
+ t.Errorf("9223372036854775807 %s 1 = %d, want 4611686018427387903", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("9223372036854775807 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint32uint64lsh(t *testing.T) {
+ var x, r uint32
+ var y uint64
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x << y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967294", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967295 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint32uint64rsh(t *testing.T) {
+ var x, r uint32
+ var y uint64
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x >> y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("4294967295 %s 1 = %d, want 2147483647", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967295 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint32uint32lsh(t *testing.T) {
+ var x, r uint32
+ var y uint32
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x << y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967294", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint32uint32rsh(t *testing.T) {
+ var x, r uint32
+ var y uint32
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x >> y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("4294967295 %s 1 = %d, want 2147483647", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967295 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint32uint16lsh(t *testing.T) {
+ var x, r uint32
+ var y uint16
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x << y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967294", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967295 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint32uint16rsh(t *testing.T) {
+ var x, r uint32
+ var y uint16
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x >> y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("4294967295 %s 1 = %d, want 2147483647", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967295 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint32uint8lsh(t *testing.T) {
+ var x, r uint32
+ var y uint8
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x << y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 4294967294 {
+ t.Errorf("4294967295 %s 1 = %d, want 4294967294", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("4294967295 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint32uint8rsh(t *testing.T) {
+ var x, r uint32
+ var y uint8
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 4294967295
+ y = 0
+ r = x >> y
+ if r != 4294967295 {
+ t.Errorf("4294967295 %s 0 = %d, want 4294967295", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("4294967295 %s 1 = %d, want 2147483647", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("4294967295 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint32uint64lsh(t *testing.T) {
+ var x, r int32
+ var y uint64
+ x = -2147483648
+ y = 0
+ r = x << y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x << y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-2147483647 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x << y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("2147483647 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("2147483647 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("2147483647 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint32uint64rsh(t *testing.T) {
+ var x, r int32
+ var y uint64
+ x = -2147483648
+ y = 0
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483648 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x >> y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483647 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 1073741823 {
+ t.Errorf("2147483647 %s 1 = %d, want 1073741823", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("2147483647 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("2147483647 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint32uint32lsh(t *testing.T) {
+ var x, r int32
+ var y uint32
+ x = -2147483648
+ y = 0
+ r = x << y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x << y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-2147483647 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x << y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("2147483647 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("2147483647 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint32uint32rsh(t *testing.T) {
+ var x, r int32
+ var y uint32
+ x = -2147483648
+ y = 0
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483648 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x >> y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483647 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 1073741823 {
+ t.Errorf("2147483647 %s 1 = %d, want 1073741823", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("2147483647 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint32uint16lsh(t *testing.T) {
+ var x, r int32
+ var y uint16
+ x = -2147483648
+ y = 0
+ r = x << y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x << y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-2147483647 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x << y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("2147483647 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("2147483647 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint32uint16rsh(t *testing.T) {
+ var x, r int32
+ var y uint16
+ x = -2147483648
+ y = 0
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483648 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x >> y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483647 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 1073741823 {
+ t.Errorf("2147483647 %s 1 = %d, want 1073741823", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("2147483647 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint32uint8lsh(t *testing.T) {
+ var x, r int32
+ var y uint8
+ x = -2147483648
+ y = 0
+ r = x << y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483648 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x << y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-2147483647 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-2147483647 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x << y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("2147483647 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("2147483647 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint32uint8rsh(t *testing.T) {
+ var x, r int32
+ var y uint8
+ x = -2147483648
+ y = 0
+ r = x >> y
+ if r != -2147483648 {
+ t.Errorf("-2147483648 %s 0 = %d, want -2147483648", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483648 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483648 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -2147483647
+ y = 0
+ r = x >> y
+ if r != -2147483647 {
+ t.Errorf("-2147483647 %s 0 = %d, want -2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1073741824 {
+ t.Errorf("-2147483647 %s 1 = %d, want -1073741824", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-2147483647 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 255 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 2147483647
+ y = 0
+ r = x >> y
+ if r != 2147483647 {
+ t.Errorf("2147483647 %s 0 = %d, want 2147483647", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 1073741823 {
+ t.Errorf("2147483647 %s 1 = %d, want 1073741823", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("2147483647 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint16uint64lsh(t *testing.T) {
+ var x, r uint16
+ var y uint64
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 65535
+ y = 0
+ r = x << y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 65534 {
+ t.Errorf("65535 %s 1 = %d, want 65534", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("65535 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("65535 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint16uint64rsh(t *testing.T) {
+ var x, r uint16
+ var y uint64
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 65535
+ y = 0
+ r = x >> y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("65535 %s 1 = %d, want 32767", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("65535 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("65535 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint16uint32lsh(t *testing.T) {
+ var x, r uint16
+ var y uint32
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 65535
+ y = 0
+ r = x << y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 65534 {
+ t.Errorf("65535 %s 1 = %d, want 65534", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("65535 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint16uint32rsh(t *testing.T) {
+ var x, r uint16
+ var y uint32
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 65535
+ y = 0
+ r = x >> y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("65535 %s 1 = %d, want 32767", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("65535 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint16uint16lsh(t *testing.T) {
+ var x, r uint16
+ var y uint16
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 65535
+ y = 0
+ r = x << y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 65534 {
+ t.Errorf("65535 %s 1 = %d, want 65534", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("65535 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint16uint16rsh(t *testing.T) {
+ var x, r uint16
+ var y uint16
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 65535
+ y = 0
+ r = x >> y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("65535 %s 1 = %d, want 32767", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("65535 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint16uint8lsh(t *testing.T) {
+ var x, r uint16
+ var y uint8
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 65535
+ y = 0
+ r = x << y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 65534 {
+ t.Errorf("65535 %s 1 = %d, want 65534", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("65535 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint16uint8rsh(t *testing.T) {
+ var x, r uint16
+ var y uint8
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 65535
+ y = 0
+ r = x >> y
+ if r != 65535 {
+ t.Errorf("65535 %s 0 = %d, want 65535", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("65535 %s 1 = %d, want 32767", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("65535 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint16uint64lsh(t *testing.T) {
+ var x, r int16
+ var y uint64
+ x = -32768
+ y = 0
+ r = x << y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -32767
+ y = 0
+ r = x << y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-32767 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32767 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32767 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 32766
+ y = 0
+ r = x << y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("32766 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("32766 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("32766 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 32767
+ y = 0
+ r = x << y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("32767 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("32767 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("32767 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint16uint64rsh(t *testing.T) {
+ var x, r int16
+ var y uint64
+ x = -32768
+ y = 0
+ r = x >> y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32768 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32768 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32768 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -32767
+ y = 0
+ r = x >> y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32767 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32767 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32767 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 32766
+ y = 0
+ r = x >> y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32766 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32766 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32766 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 32767
+ y = 0
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32767 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32767 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32767 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint16uint32lsh(t *testing.T) {
+ var x, r int16
+ var y uint32
+ x = -32768
+ y = 0
+ r = x << y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -32767
+ y = 0
+ r = x << y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-32767 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32767 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 32766
+ y = 0
+ r = x << y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("32766 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("32766 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 32767
+ y = 0
+ r = x << y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("32767 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("32767 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint16uint32rsh(t *testing.T) {
+ var x, r int16
+ var y uint32
+ x = -32768
+ y = 0
+ r = x >> y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32768 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32768 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -32767
+ y = 0
+ r = x >> y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32767 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32767 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 32766
+ y = 0
+ r = x >> y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32766 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32766 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 32767
+ y = 0
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32767 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32767 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint16uint16lsh(t *testing.T) {
+ var x, r int16
+ var y uint16
+ x = -32768
+ y = 0
+ r = x << y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -32767
+ y = 0
+ r = x << y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-32767 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32767 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 32766
+ y = 0
+ r = x << y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("32766 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("32766 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 32767
+ y = 0
+ r = x << y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("32767 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("32767 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint16uint16rsh(t *testing.T) {
+ var x, r int16
+ var y uint16
+ x = -32768
+ y = 0
+ r = x >> y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32768 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32768 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -32767
+ y = 0
+ r = x >> y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32767 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32767 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 32766
+ y = 0
+ r = x >> y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32766 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32766 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 32767
+ y = 0
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32767 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32767 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint16uint8lsh(t *testing.T) {
+ var x, r int16
+ var y uint8
+ x = -32768
+ y = 0
+ r = x << y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32768 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -32767
+ y = 0
+ r = x << y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-32767 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-32767 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 32766
+ y = 0
+ r = x << y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("32766 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("32766 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 32767
+ y = 0
+ r = x << y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("32767 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("32767 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint16uint8rsh(t *testing.T) {
+ var x, r int16
+ var y uint8
+ x = -32768
+ y = 0
+ r = x >> y
+ if r != -32768 {
+ t.Errorf("-32768 %s 0 = %d, want -32768", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32768 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32768 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -32767
+ y = 0
+ r = x >> y
+ if r != -32767 {
+ t.Errorf("-32767 %s 0 = %d, want -32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -16384 {
+ t.Errorf("-32767 %s 1 = %d, want -16384", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-32767 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 255 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 32766
+ y = 0
+ r = x >> y
+ if r != 32766 {
+ t.Errorf("32766 %s 0 = %d, want 32766", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32766 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32766 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 32767
+ y = 0
+ r = x >> y
+ if r != 32767 {
+ t.Errorf("32767 %s 0 = %d, want 32767", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 16383 {
+ t.Errorf("32767 %s 1 = %d, want 16383", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("32767 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint8uint64lsh(t *testing.T) {
+ var x, r uint8
+ var y uint64
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 255
+ y = 0
+ r = x << y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 254 {
+ t.Errorf("255 %s 1 = %d, want 254", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("255 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("255 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint8uint64rsh(t *testing.T) {
+ var x, r uint8
+ var y uint64
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 255
+ y = 0
+ r = x >> y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 127 {
+ t.Errorf("255 %s 1 = %d, want 127", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("255 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("255 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint8uint32lsh(t *testing.T) {
+ var x, r uint8
+ var y uint32
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 255
+ y = 0
+ r = x << y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 254 {
+ t.Errorf("255 %s 1 = %d, want 254", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("255 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint8uint32rsh(t *testing.T) {
+ var x, r uint8
+ var y uint32
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 255
+ y = 0
+ r = x >> y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 127 {
+ t.Errorf("255 %s 1 = %d, want 127", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("255 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint8uint16lsh(t *testing.T) {
+ var x, r uint8
+ var y uint16
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 255
+ y = 0
+ r = x << y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 254 {
+ t.Errorf("255 %s 1 = %d, want 254", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("255 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint8uint16rsh(t *testing.T) {
+ var x, r uint8
+ var y uint16
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 255
+ y = 0
+ r = x >> y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 127 {
+ t.Errorf("255 %s 1 = %d, want 127", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("255 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFolduint8uint8lsh(t *testing.T) {
+ var x, r uint8
+ var y uint8
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 255
+ y = 0
+ r = x << y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 254 {
+ t.Errorf("255 %s 1 = %d, want 254", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("255 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFolduint8uint8rsh(t *testing.T) {
+ var x, r uint8
+ var y uint8
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 255
+ y = 0
+ r = x >> y
+ if r != 255 {
+ t.Errorf("255 %s 0 = %d, want 255", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 127 {
+ t.Errorf("255 %s 1 = %d, want 127", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("255 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint8uint64lsh(t *testing.T) {
+ var x, r int8
+ var y uint64
+ x = -128
+ y = 0
+ r = x << y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -127
+ y = 0
+ r = x << y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-127 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-127 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-127 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 126
+ y = 0
+ r = x << y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("126 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("126 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("126 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+ x = 127
+ y = 0
+ r = x << y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("127 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967296
+ r = x << y
+ if r != 0 {
+ t.Errorf("127 %s 4294967296 = %d, want 0", "<<", r)
+ }
+ y = 18446744073709551615
+ r = x << y
+ if r != 0 {
+ t.Errorf("127 %s 18446744073709551615 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint8uint64rsh(t *testing.T) {
+ var x, r int8
+ var y uint64
+ x = -128
+ y = 0
+ r = x >> y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-128 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-128 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-128 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -127
+ y = 0
+ r = x >> y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-127 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-127 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-127 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967296 = %d, want -1", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 18446744073709551615 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 126
+ y = 0
+ r = x >> y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("126 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("126 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("126 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+ x = 127
+ y = 0
+ r = x >> y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("127 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 4294967296
+ r = x >> y
+ if r != 0 {
+ t.Errorf("127 %s 4294967296 = %d, want 0", ">>", r)
+ }
+ y = 18446744073709551615
+ r = x >> y
+ if r != 0 {
+ t.Errorf("127 %s 18446744073709551615 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint8uint32lsh(t *testing.T) {
+ var x, r int8
+ var y uint32
+ x = -128
+ y = 0
+ r = x << y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -127
+ y = 0
+ r = x << y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-127 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-127 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 126
+ y = 0
+ r = x << y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("126 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("126 %s 4294967295 = %d, want 0", "<<", r)
+ }
+ x = 127
+ y = 0
+ r = x << y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("127 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 4294967295
+ r = x << y
+ if r != 0 {
+ t.Errorf("127 %s 4294967295 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint8uint32rsh(t *testing.T) {
+ var x, r int8
+ var y uint32
+ x = -128
+ y = 0
+ r = x >> y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-128 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-128 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -127
+ y = 0
+ r = x >> y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-127 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-127 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 4294967295 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 126
+ y = 0
+ r = x >> y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("126 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("126 %s 4294967295 = %d, want 0", ">>", r)
+ }
+ x = 127
+ y = 0
+ r = x >> y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("127 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 4294967295
+ r = x >> y
+ if r != 0 {
+ t.Errorf("127 %s 4294967295 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint8uint16lsh(t *testing.T) {
+ var x, r int8
+ var y uint16
+ x = -128
+ y = 0
+ r = x << y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -127
+ y = 0
+ r = x << y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-127 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-127 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 126
+ y = 0
+ r = x << y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("126 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("126 %s 65535 = %d, want 0", "<<", r)
+ }
+ x = 127
+ y = 0
+ r = x << y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("127 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 65535
+ r = x << y
+ if r != 0 {
+ t.Errorf("127 %s 65535 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint8uint16rsh(t *testing.T) {
+ var x, r int8
+ var y uint16
+ x = -128
+ y = 0
+ r = x >> y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-128 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-128 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -127
+ y = 0
+ r = x >> y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-127 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-127 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 65535 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 126
+ y = 0
+ r = x >> y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("126 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("126 %s 65535 = %d, want 0", ">>", r)
+ }
+ x = 127
+ y = 0
+ r = x >> y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("127 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 65535
+ r = x >> y
+ if r != 0 {
+ t.Errorf("127 %s 65535 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldint8uint8lsh(t *testing.T) {
+ var x, r int8
+ var y uint8
+ x = -128
+ y = 0
+ r = x << y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-128 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -127
+ y = 0
+ r = x << y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("-127 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-127 %s 255 = %d, want 0", "<<", r)
+ }
+ x = -1
+ y = 0
+ r = x << y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("-1 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("-1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 0
+ y = 0
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 1
+ y = 0
+ r = x << y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != 2 {
+ t.Errorf("1 %s 1 = %d, want 2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 126
+ y = 0
+ r = x << y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -4 {
+ t.Errorf("126 %s 1 = %d, want -4", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("126 %s 255 = %d, want 0", "<<", r)
+ }
+ x = 127
+ y = 0
+ r = x << y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", "<<", r)
+ }
+ y = 1
+ r = x << y
+ if r != -2 {
+ t.Errorf("127 %s 1 = %d, want -2", "<<", r)
+ }
+ y = 255
+ r = x << y
+ if r != 0 {
+ t.Errorf("127 %s 255 = %d, want 0", "<<", r)
+ }
+}
+func TestConstFoldint8uint8rsh(t *testing.T) {
+ var x, r int8
+ var y uint8
+ x = -128
+ y = 0
+ r = x >> y
+ if r != -128 {
+ t.Errorf("-128 %s 0 = %d, want -128", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-128 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-128 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -127
+ y = 0
+ r = x >> y
+ if r != -127 {
+ t.Errorf("-127 %s 0 = %d, want -127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -64 {
+ t.Errorf("-127 %s 1 = %d, want -64", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-127 %s 255 = %d, want -1", ">>", r)
+ }
+ x = -1
+ y = 0
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 0 = %d, want -1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 1 = %d, want -1", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != -1 {
+ t.Errorf("-1 %s 255 = %d, want -1", ">>", r)
+ }
+ x = 0
+ y = 0
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 0 = %d, want 0", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("0 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 1
+ y = 0
+ r = x >> y
+ if r != 1 {
+ t.Errorf("1 %s 0 = %d, want 1", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 1 = %d, want 0", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("1 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 126
+ y = 0
+ r = x >> y
+ if r != 126 {
+ t.Errorf("126 %s 0 = %d, want 126", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("126 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("126 %s 255 = %d, want 0", ">>", r)
+ }
+ x = 127
+ y = 0
+ r = x >> y
+ if r != 127 {
+ t.Errorf("127 %s 0 = %d, want 127", ">>", r)
+ }
+ y = 1
+ r = x >> y
+ if r != 63 {
+ t.Errorf("127 %s 1 = %d, want 63", ">>", r)
+ }
+ y = 255
+ r = x >> y
+ if r != 0 {
+ t.Errorf("127 %s 255 = %d, want 0", ">>", r)
+ }
+}
+func TestConstFoldCompareuint64(t *testing.T) {
+ {
+ var x uint64 = 0
+ var y uint64 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 0
+ var y uint64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 0
+ var y uint64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 0
+ var y uint64 = 18446744073709551615
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 1
+ var y uint64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 1
+ var y uint64 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 1
+ var y uint64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 1
+ var y uint64 = 18446744073709551615
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 4294967296
+ var y uint64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 4294967296
+ var y uint64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 4294967296
+ var y uint64 = 4294967296
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 4294967296
+ var y uint64 = 18446744073709551615
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint64 = 18446744073709551615
+ var y uint64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 18446744073709551615
+ var y uint64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 18446744073709551615
+ var y uint64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint64 = 18446744073709551615
+ var y uint64 = 18446744073709551615
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareint64(t *testing.T) {
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = -9223372036854775808
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775808
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = -9223372036854775807
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -9223372036854775807
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = -4294967296
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -4294967296
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = -1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = -1
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 0
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 1
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = 4294967296
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 4294967296
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = 9223372036854775806
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775806
+ var y int64 = 9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = -9223372036854775808
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = -9223372036854775807
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = -4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = 4294967296
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = 9223372036854775806
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int64 = 9223372036854775807
+ var y int64 = 9223372036854775807
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareuint32(t *testing.T) {
+ {
+ var x uint32 = 0
+ var y uint32 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint32 = 0
+ var y uint32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint32 = 0
+ var y uint32 = 4294967295
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint32 = 1
+ var y uint32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint32 = 1
+ var y uint32 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint32 = 1
+ var y uint32 = 4294967295
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint32 = 4294967295
+ var y uint32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint32 = 4294967295
+ var y uint32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint32 = 4294967295
+ var y uint32 = 4294967295
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareint32(t *testing.T) {
+ {
+ var x int32 = -2147483648
+ var y int32 = -2147483648
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483648
+ var y int32 = -2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483648
+ var y int32 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483648
+ var y int32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483648
+ var y int32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483648
+ var y int32 = 2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = -2147483648
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = -2147483647
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -2147483647
+ var y int32 = 2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = -2147483648
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = -2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = -1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = -1
+ var y int32 = 2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = -2147483648
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = -2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = 0
+ var y int32 = 2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = -2147483648
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = -2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 1
+ var y int32 = 2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = -2147483648
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = -2147483647
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int32 = 2147483647
+ var y int32 = 2147483647
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareuint16(t *testing.T) {
+ {
+ var x uint16 = 0
+ var y uint16 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint16 = 0
+ var y uint16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint16 = 0
+ var y uint16 = 65535
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint16 = 1
+ var y uint16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint16 = 1
+ var y uint16 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint16 = 1
+ var y uint16 = 65535
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint16 = 65535
+ var y uint16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint16 = 65535
+ var y uint16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint16 = 65535
+ var y uint16 = 65535
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareint16(t *testing.T) {
+ {
+ var x int16 = -32768
+ var y int16 = -32768
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32768
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = -32767
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -32767
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = -1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = -1
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 0
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 1
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = 32766
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32766
+ var y int16 = 32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = -32768
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = -32767
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = 32766
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int16 = 32767
+ var y int16 = 32767
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareuint8(t *testing.T) {
+ {
+ var x uint8 = 0
+ var y uint8 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint8 = 0
+ var y uint8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint8 = 0
+ var y uint8 = 255
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint8 = 1
+ var y uint8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint8 = 1
+ var y uint8 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint8 = 1
+ var y uint8 = 255
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x uint8 = 255
+ var y uint8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint8 = 255
+ var y uint8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x uint8 = 255
+ var y uint8 = 255
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
+func TestConstFoldCompareint8(t *testing.T) {
+ {
+ var x int8 = -128
+ var y int8 = -128
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -128
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = -127
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -127
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = -1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = -1
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = 0
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 0
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = 1
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 1
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = 126
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 126
+ var y int8 = 127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if !(x < y) {
+ t.Errorf("!(%d < %d)", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if x >= y {
+ t.Errorf("%d >= %d", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = -128
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = -127
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = -1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = 0
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = 1
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = 126
+ if x == y {
+ t.Errorf("%d == %d", x, y)
+ }
+ if !(x != y) {
+ t.Errorf("!(%d != %d)", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if !(x > y) {
+ t.Errorf("!(%d > %d)", x, y)
+ }
+ if x <= y {
+ t.Errorf("%d <= %d", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+ {
+ var x int8 = 127
+ var y int8 = 127
+ if !(x == y) {
+ t.Errorf("!(%d == %d)", x, y)
+ }
+ if x != y {
+ t.Errorf("%d != %d", x, y)
+ }
+ if x < y {
+ t.Errorf("%d < %d", x, y)
+ }
+ if x > y {
+ t.Errorf("%d > %d", x, y)
+ }
+ if !(x <= y) {
+ t.Errorf("!(%d <= %d)", x, y)
+ }
+ if !(x >= y) {
+ t.Errorf("!(%d >= %d)", x, y)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/dep_test.go b/src/cmd/compile/internal/test/dep_test.go
new file mode 100644
index 0000000..d141f10
--- /dev/null
+++ b/src/cmd/compile/internal/test/dep_test.go
@@ -0,0 +1,29 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "internal/testenv"
+ "strings"
+ "testing"
+)
+
+func TestDeps(t *testing.T) {
+ out, err := testenv.Command(t, testenv.GoToolPath(t), "list", "-f", "{{.Deps}}", "cmd/compile/internal/gc").Output()
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, dep := range strings.Fields(strings.Trim(string(out), "[]")) {
+ switch dep {
+ case "go/build", "go/scanner":
+ // cmd/compile/internal/importer introduces a dependency
+ // on go/build and go/token; cmd/compile/internal/ uses
+ // go/constant which uses go/token in its API. Once we
+ // got rid of those dependencies, enable this check again.
+ // TODO(gri) fix this
+ // t.Errorf("undesired dependency on %q", dep)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/divconst_test.go b/src/cmd/compile/internal/test/divconst_test.go
new file mode 100644
index 0000000..9358a60
--- /dev/null
+++ b/src/cmd/compile/internal/test/divconst_test.go
@@ -0,0 +1,325 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "testing"
+)
+
+var boolres bool
+
+var i64res int64
+
+func BenchmarkDivconstI64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i64res = int64(i) / 7
+ }
+}
+
+func BenchmarkModconstI64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i64res = int64(i) % 7
+ }
+}
+
+func BenchmarkDivisiblePow2constI64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int64(i)%16 == 0
+ }
+}
+func BenchmarkDivisibleconstI64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int64(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstI64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i64res = int64(i) / 7
+ boolres = int64(i)%7 == 0
+ }
+}
+
+var u64res uint64
+
+func TestDivmodConstU64(t *testing.T) {
+ // Test division by c. Function f must be func(n) { return n/c, n%c }
+ testdiv := func(c uint64, f func(uint64) (uint64, uint64)) func(*testing.T) {
+ return func(t *testing.T) {
+ x := uint64(12345)
+ for i := 0; i < 10000; i++ {
+ x += x << 2
+ q, r := f(x)
+ if r < 0 || r >= c || q*c+r != x {
+ t.Errorf("divmod(%d, %d) returned incorrect (%d, %d)", x, c, q, r)
+ }
+ }
+ max := uint64(1<<64-1) / c * c
+ xs := []uint64{0, 1, c - 1, c, c + 1, 2*c - 1, 2 * c, 2*c + 1,
+ c*c - 1, c * c, c*c + 1, max - 1, max, max + 1, 1<<64 - 1}
+ for _, x := range xs {
+ q, r := f(x)
+ if r < 0 || r >= c || q*c+r != x {
+ t.Errorf("divmod(%d, %d) returned incorrect (%d, %d)", x, c, q, r)
+ }
+ }
+ }
+ }
+ t.Run("2", testdiv(2, func(n uint64) (uint64, uint64) { return n / 2, n % 2 }))
+ t.Run("3", testdiv(3, func(n uint64) (uint64, uint64) { return n / 3, n % 3 }))
+ t.Run("4", testdiv(4, func(n uint64) (uint64, uint64) { return n / 4, n % 4 }))
+ t.Run("5", testdiv(5, func(n uint64) (uint64, uint64) { return n / 5, n % 5 }))
+ t.Run("6", testdiv(6, func(n uint64) (uint64, uint64) { return n / 6, n % 6 }))
+ t.Run("7", testdiv(7, func(n uint64) (uint64, uint64) { return n / 7, n % 7 }))
+ t.Run("8", testdiv(8, func(n uint64) (uint64, uint64) { return n / 8, n % 8 }))
+ t.Run("9", testdiv(9, func(n uint64) (uint64, uint64) { return n / 9, n % 9 }))
+ t.Run("10", testdiv(10, func(n uint64) (uint64, uint64) { return n / 10, n % 10 }))
+ t.Run("11", testdiv(11, func(n uint64) (uint64, uint64) { return n / 11, n % 11 }))
+ t.Run("12", testdiv(12, func(n uint64) (uint64, uint64) { return n / 12, n % 12 }))
+ t.Run("13", testdiv(13, func(n uint64) (uint64, uint64) { return n / 13, n % 13 }))
+ t.Run("14", testdiv(14, func(n uint64) (uint64, uint64) { return n / 14, n % 14 }))
+ t.Run("15", testdiv(15, func(n uint64) (uint64, uint64) { return n / 15, n % 15 }))
+ t.Run("16", testdiv(16, func(n uint64) (uint64, uint64) { return n / 16, n % 16 }))
+ t.Run("17", testdiv(17, func(n uint64) (uint64, uint64) { return n / 17, n % 17 }))
+ t.Run("255", testdiv(255, func(n uint64) (uint64, uint64) { return n / 255, n % 255 }))
+ t.Run("256", testdiv(256, func(n uint64) (uint64, uint64) { return n / 256, n % 256 }))
+ t.Run("257", testdiv(257, func(n uint64) (uint64, uint64) { return n / 257, n % 257 }))
+ t.Run("65535", testdiv(65535, func(n uint64) (uint64, uint64) { return n / 65535, n % 65535 }))
+ t.Run("65536", testdiv(65536, func(n uint64) (uint64, uint64) { return n / 65536, n % 65536 }))
+ t.Run("65537", testdiv(65537, func(n uint64) (uint64, uint64) { return n / 65537, n % 65537 }))
+ t.Run("1<<32-1", testdiv(1<<32-1, func(n uint64) (uint64, uint64) { return n / (1<<32 - 1), n % (1<<32 - 1) }))
+ t.Run("1<<32+1", testdiv(1<<32+1, func(n uint64) (uint64, uint64) { return n / (1<<32 + 1), n % (1<<32 + 1) }))
+ t.Run("1<<64-1", testdiv(1<<64-1, func(n uint64) (uint64, uint64) { return n / (1<<64 - 1), n % (1<<64 - 1) }))
+}
+
+func BenchmarkDivconstU64(b *testing.B) {
+ b.Run("3", func(b *testing.B) {
+ x := uint64(123456789123456789)
+ for i := 0; i < b.N; i++ {
+ x += x << 4
+ u64res = uint64(x) / 3
+ }
+ })
+ b.Run("5", func(b *testing.B) {
+ x := uint64(123456789123456789)
+ for i := 0; i < b.N; i++ {
+ x += x << 4
+ u64res = uint64(x) / 5
+ }
+ })
+ b.Run("37", func(b *testing.B) {
+ x := uint64(123456789123456789)
+ for i := 0; i < b.N; i++ {
+ x += x << 4
+ u64res = uint64(x) / 37
+ }
+ })
+ b.Run("1234567", func(b *testing.B) {
+ x := uint64(123456789123456789)
+ for i := 0; i < b.N; i++ {
+ x += x << 4
+ u64res = uint64(x) / 1234567
+ }
+ })
+}
+
+func BenchmarkModconstU64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u64res = uint64(i) % 7
+ }
+}
+
+func BenchmarkDivisibleconstU64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = uint64(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstU64(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u64res = uint64(i) / 7
+ boolres = uint64(i)%7 == 0
+ }
+}
+
+var i32res int32
+
+func BenchmarkDivconstI32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i32res = int32(i) / 7
+ }
+}
+
+func BenchmarkModconstI32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i32res = int32(i) % 7
+ }
+}
+
+func BenchmarkDivisiblePow2constI32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int32(i)%16 == 0
+ }
+}
+
+func BenchmarkDivisibleconstI32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int32(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstI32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i32res = int32(i) / 7
+ boolres = int32(i)%7 == 0
+ }
+}
+
+var u32res uint32
+
+func BenchmarkDivconstU32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u32res = uint32(i) / 7
+ }
+}
+
+func BenchmarkModconstU32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u32res = uint32(i) % 7
+ }
+}
+
+func BenchmarkDivisibleconstU32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = uint32(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstU32(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u32res = uint32(i) / 7
+ boolres = uint32(i)%7 == 0
+ }
+}
+
+var i16res int16
+
+func BenchmarkDivconstI16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i16res = int16(i) / 7
+ }
+}
+
+func BenchmarkModconstI16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i16res = int16(i) % 7
+ }
+}
+
+func BenchmarkDivisiblePow2constI16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int16(i)%16 == 0
+ }
+}
+
+func BenchmarkDivisibleconstI16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int16(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstI16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i16res = int16(i) / 7
+ boolres = int16(i)%7 == 0
+ }
+}
+
+var u16res uint16
+
+func BenchmarkDivconstU16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u16res = uint16(i) / 7
+ }
+}
+
+func BenchmarkModconstU16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u16res = uint16(i) % 7
+ }
+}
+
+func BenchmarkDivisibleconstU16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = uint16(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstU16(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u16res = uint16(i) / 7
+ boolres = uint16(i)%7 == 0
+ }
+}
+
+var i8res int8
+
+func BenchmarkDivconstI8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i8res = int8(i) / 7
+ }
+}
+
+func BenchmarkModconstI8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i8res = int8(i) % 7
+ }
+}
+
+func BenchmarkDivisiblePow2constI8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int8(i)%16 == 0
+ }
+}
+
+func BenchmarkDivisibleconstI8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = int8(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstI8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ i8res = int8(i) / 7
+ boolres = int8(i)%7 == 0
+ }
+}
+
+var u8res uint8
+
+func BenchmarkDivconstU8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u8res = uint8(i) / 7
+ }
+}
+
+func BenchmarkModconstU8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u8res = uint8(i) % 7
+ }
+}
+
+func BenchmarkDivisibleconstU8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ boolres = uint8(i)%7 == 0
+ }
+}
+
+func BenchmarkDivisibleWDivconstU8(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ u8res = uint8(i) / 7
+ boolres = uint8(i)%7 == 0
+ }
+}
diff --git a/src/cmd/compile/internal/test/fixedbugs_test.go b/src/cmd/compile/internal/test/fixedbugs_test.go
new file mode 100644
index 0000000..8ff7a60
--- /dev/null
+++ b/src/cmd/compile/internal/test/fixedbugs_test.go
@@ -0,0 +1,86 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+)
+
+type T struct {
+ x [2]int64 // field that will be clobbered. Also makes type not SSAable.
+ p *byte // has a pointer
+}
+
+//go:noinline
+func makeT() T {
+ return T{}
+}
+
+var g T
+
+var sink interface{}
+
+func TestIssue15854(t *testing.T) {
+ for i := 0; i < 10000; i++ {
+ if g.x[0] != 0 {
+ t.Fatalf("g.x[0] clobbered with %x\n", g.x[0])
+ }
+ // The bug was in the following assignment. The return
+ // value of makeT() is not copied out of the args area of
+ // stack frame in a timely fashion. So when write barriers
+ // are enabled, the marshaling of the args for the write
+ // barrier call clobbers the result of makeT() before it is
+ // read by the write barrier code.
+ g = makeT()
+ sink = make([]byte, 1000) // force write barriers to eventually happen
+ }
+}
+func TestIssue15854b(t *testing.T) {
+ const N = 10000
+ a := make([]T, N)
+ for i := 0; i < N; i++ {
+ a = append(a, makeT())
+ sink = make([]byte, 1000) // force write barriers to eventually happen
+ }
+ for i, v := range a {
+ if v.x[0] != 0 {
+ t.Fatalf("a[%d].x[0] clobbered with %x\n", i, v.x[0])
+ }
+ }
+}
+
+// Test that the generated assembly has line numbers (Issue #16214).
+func TestIssue16214(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ dir := t.TempDir()
+
+ src := filepath.Join(dir, "x.go")
+ err := os.WriteFile(src, []byte(issue16214src), 0644)
+ if err != nil {
+ t.Fatalf("could not write file: %v", err)
+ }
+
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "compile", "-p=main", "-S", "-o", filepath.Join(dir, "out.o"), src)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("go tool compile: %v\n%s", err, out)
+ }
+
+ if strings.Contains(string(out), "unknown line number") {
+ t.Errorf("line number missing in assembly:\n%s", out)
+ }
+}
+
+var issue16214src = `
+package main
+
+func Mod32(x uint32) uint32 {
+ return x % 3 // frontend rewrites it as HMUL with 2863311531, the LITERAL node has unknown Pos
+}
+`
diff --git a/src/cmd/compile/internal/test/float_test.go b/src/cmd/compile/internal/test/float_test.go
new file mode 100644
index 0000000..c736f97
--- /dev/null
+++ b/src/cmd/compile/internal/test/float_test.go
@@ -0,0 +1,545 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "math"
+ "testing"
+)
+
+//go:noinline
+func compare1(a, b float64) bool {
+ return a < b
+}
+
+//go:noinline
+func compare2(a, b float32) bool {
+ return a < b
+}
+
+func TestFloatCompare(t *testing.T) {
+ if !compare1(3, 5) {
+ t.Errorf("compare1 returned false")
+ }
+ if !compare2(3, 5) {
+ t.Errorf("compare2 returned false")
+ }
+}
+
+func TestFloatCompareFolded(t *testing.T) {
+ // float64 comparisons
+ d1, d3, d5, d9 := float64(1), float64(3), float64(5), float64(9)
+ if d3 == d5 {
+ t.Errorf("d3 == d5 returned true")
+ }
+ if d3 != d3 {
+ t.Errorf("d3 != d3 returned true")
+ }
+ if d3 > d5 {
+ t.Errorf("d3 > d5 returned true")
+ }
+ if d3 >= d9 {
+ t.Errorf("d3 >= d9 returned true")
+ }
+ if d5 < d1 {
+ t.Errorf("d5 < d1 returned true")
+ }
+ if d9 <= d1 {
+ t.Errorf("d9 <= d1 returned true")
+ }
+ if math.NaN() == math.NaN() {
+ t.Errorf("math.NaN() == math.NaN() returned true")
+ }
+ if math.NaN() >= math.NaN() {
+ t.Errorf("math.NaN() >= math.NaN() returned true")
+ }
+ if math.NaN() <= math.NaN() {
+ t.Errorf("math.NaN() <= math.NaN() returned true")
+ }
+ if math.Copysign(math.NaN(), -1) < math.NaN() {
+ t.Errorf("math.Copysign(math.NaN(), -1) < math.NaN() returned true")
+ }
+ if math.Inf(1) != math.Inf(1) {
+ t.Errorf("math.Inf(1) != math.Inf(1) returned true")
+ }
+ if math.Inf(-1) != math.Inf(-1) {
+ t.Errorf("math.Inf(-1) != math.Inf(-1) returned true")
+ }
+ if math.Copysign(0, -1) != 0 {
+ t.Errorf("math.Copysign(0, -1) != 0 returned true")
+ }
+ if math.Copysign(0, -1) < 0 {
+ t.Errorf("math.Copysign(0, -1) < 0 returned true")
+ }
+ if 0 > math.Copysign(0, -1) {
+ t.Errorf("0 > math.Copysign(0, -1) returned true")
+ }
+
+ // float32 comparisons
+ s1, s3, s5, s9 := float32(1), float32(3), float32(5), float32(9)
+ if s3 == s5 {
+ t.Errorf("s3 == s5 returned true")
+ }
+ if s3 != s3 {
+ t.Errorf("s3 != s3 returned true")
+ }
+ if s3 > s5 {
+ t.Errorf("s3 > s5 returned true")
+ }
+ if s3 >= s9 {
+ t.Errorf("s3 >= s9 returned true")
+ }
+ if s5 < s1 {
+ t.Errorf("s5 < s1 returned true")
+ }
+ if s9 <= s1 {
+ t.Errorf("s9 <= s1 returned true")
+ }
+ sPosNaN, sNegNaN := float32(math.NaN()), float32(math.Copysign(math.NaN(), -1))
+ if sPosNaN == sPosNaN {
+ t.Errorf("sPosNaN == sPosNaN returned true")
+ }
+ if sPosNaN >= sPosNaN {
+ t.Errorf("sPosNaN >= sPosNaN returned true")
+ }
+ if sPosNaN <= sPosNaN {
+ t.Errorf("sPosNaN <= sPosNaN returned true")
+ }
+ if sNegNaN < sPosNaN {
+ t.Errorf("sNegNaN < sPosNaN returned true")
+ }
+ sPosInf, sNegInf := float32(math.Inf(1)), float32(math.Inf(-1))
+ if sPosInf != sPosInf {
+ t.Errorf("sPosInf != sPosInf returned true")
+ }
+ if sNegInf != sNegInf {
+ t.Errorf("sNegInf != sNegInf returned true")
+ }
+ sNegZero := float32(math.Copysign(0, -1))
+ if sNegZero != 0 {
+ t.Errorf("sNegZero != 0 returned true")
+ }
+ if sNegZero < 0 {
+ t.Errorf("sNegZero < 0 returned true")
+ }
+ if 0 > sNegZero {
+ t.Errorf("0 > sNegZero returned true")
+ }
+}
+
+//go:noinline
+func cvt1(a float64) uint64 {
+ return uint64(a)
+}
+
+//go:noinline
+func cvt2(a float64) uint32 {
+ return uint32(a)
+}
+
+//go:noinline
+func cvt3(a float32) uint64 {
+ return uint64(a)
+}
+
+//go:noinline
+func cvt4(a float32) uint32 {
+ return uint32(a)
+}
+
+//go:noinline
+func cvt5(a float64) int64 {
+ return int64(a)
+}
+
+//go:noinline
+func cvt6(a float64) int32 {
+ return int32(a)
+}
+
+//go:noinline
+func cvt7(a float32) int64 {
+ return int64(a)
+}
+
+//go:noinline
+func cvt8(a float32) int32 {
+ return int32(a)
+}
+
+// make sure to cover int, uint cases (issue #16738)
+//
+//go:noinline
+func cvt9(a float64) int {
+ return int(a)
+}
+
+//go:noinline
+func cvt10(a float64) uint {
+ return uint(a)
+}
+
+//go:noinline
+func cvt11(a float32) int {
+ return int(a)
+}
+
+//go:noinline
+func cvt12(a float32) uint {
+ return uint(a)
+}
+
+//go:noinline
+func f2i64p(v float64) *int64 {
+ return ip64(int64(v / 0.1))
+}
+
+//go:noinline
+func ip64(v int64) *int64 {
+ return &v
+}
+
+func TestFloatConvert(t *testing.T) {
+ if got := cvt1(3.5); got != 3 {
+ t.Errorf("cvt1 got %d, wanted 3", got)
+ }
+ if got := cvt2(3.5); got != 3 {
+ t.Errorf("cvt2 got %d, wanted 3", got)
+ }
+ if got := cvt3(3.5); got != 3 {
+ t.Errorf("cvt3 got %d, wanted 3", got)
+ }
+ if got := cvt4(3.5); got != 3 {
+ t.Errorf("cvt4 got %d, wanted 3", got)
+ }
+ if got := cvt5(3.5); got != 3 {
+ t.Errorf("cvt5 got %d, wanted 3", got)
+ }
+ if got := cvt6(3.5); got != 3 {
+ t.Errorf("cvt6 got %d, wanted 3", got)
+ }
+ if got := cvt7(3.5); got != 3 {
+ t.Errorf("cvt7 got %d, wanted 3", got)
+ }
+ if got := cvt8(3.5); got != 3 {
+ t.Errorf("cvt8 got %d, wanted 3", got)
+ }
+ if got := cvt9(3.5); got != 3 {
+ t.Errorf("cvt9 got %d, wanted 3", got)
+ }
+ if got := cvt10(3.5); got != 3 {
+ t.Errorf("cvt10 got %d, wanted 3", got)
+ }
+ if got := cvt11(3.5); got != 3 {
+ t.Errorf("cvt11 got %d, wanted 3", got)
+ }
+ if got := cvt12(3.5); got != 3 {
+ t.Errorf("cvt12 got %d, wanted 3", got)
+ }
+ if got := *f2i64p(10); got != 100 {
+ t.Errorf("f2i64p got %d, wanted 100", got)
+ }
+}
+
+func TestFloatConvertFolded(t *testing.T) {
+ // Assign constants to variables so that they are (hopefully) constant folded
+ // by the SSA backend rather than the frontend.
+ u64, u32, u16, u8 := uint64(1<<63), uint32(1<<31), uint16(1<<15), uint8(1<<7)
+ i64, i32, i16, i8 := int64(-1<<63), int32(-1<<31), int16(-1<<15), int8(-1<<7)
+ du64, du32, du16, du8 := float64(1<<63), float64(1<<31), float64(1<<15), float64(1<<7)
+ di64, di32, di16, di8 := float64(-1<<63), float64(-1<<31), float64(-1<<15), float64(-1<<7)
+ su64, su32, su16, su8 := float32(1<<63), float32(1<<31), float32(1<<15), float32(1<<7)
+ si64, si32, si16, si8 := float32(-1<<63), float32(-1<<31), float32(-1<<15), float32(-1<<7)
+
+ // integer to float
+ if float64(u64) != du64 {
+ t.Errorf("float64(u64) != du64")
+ }
+ if float64(u32) != du32 {
+ t.Errorf("float64(u32) != du32")
+ }
+ if float64(u16) != du16 {
+ t.Errorf("float64(u16) != du16")
+ }
+ if float64(u8) != du8 {
+ t.Errorf("float64(u8) != du8")
+ }
+ if float64(i64) != di64 {
+ t.Errorf("float64(i64) != di64")
+ }
+ if float64(i32) != di32 {
+ t.Errorf("float64(i32) != di32")
+ }
+ if float64(i16) != di16 {
+ t.Errorf("float64(i16) != di16")
+ }
+ if float64(i8) != di8 {
+ t.Errorf("float64(i8) != di8")
+ }
+ if float32(u64) != su64 {
+ t.Errorf("float32(u64) != su64")
+ }
+ if float32(u32) != su32 {
+ t.Errorf("float32(u32) != su32")
+ }
+ if float32(u16) != su16 {
+ t.Errorf("float32(u16) != su16")
+ }
+ if float32(u8) != su8 {
+ t.Errorf("float32(u8) != su8")
+ }
+ if float32(i64) != si64 {
+ t.Errorf("float32(i64) != si64")
+ }
+ if float32(i32) != si32 {
+ t.Errorf("float32(i32) != si32")
+ }
+ if float32(i16) != si16 {
+ t.Errorf("float32(i16) != si16")
+ }
+ if float32(i8) != si8 {
+ t.Errorf("float32(i8) != si8")
+ }
+
+ // float to integer
+ if uint64(du64) != u64 {
+ t.Errorf("uint64(du64) != u64")
+ }
+ if uint32(du32) != u32 {
+ t.Errorf("uint32(du32) != u32")
+ }
+ if uint16(du16) != u16 {
+ t.Errorf("uint16(du16) != u16")
+ }
+ if uint8(du8) != u8 {
+ t.Errorf("uint8(du8) != u8")
+ }
+ if int64(di64) != i64 {
+ t.Errorf("int64(di64) != i64")
+ }
+ if int32(di32) != i32 {
+ t.Errorf("int32(di32) != i32")
+ }
+ if int16(di16) != i16 {
+ t.Errorf("int16(di16) != i16")
+ }
+ if int8(di8) != i8 {
+ t.Errorf("int8(di8) != i8")
+ }
+ if uint64(su64) != u64 {
+ t.Errorf("uint64(su64) != u64")
+ }
+ if uint32(su32) != u32 {
+ t.Errorf("uint32(su32) != u32")
+ }
+ if uint16(su16) != u16 {
+ t.Errorf("uint16(su16) != u16")
+ }
+ if uint8(su8) != u8 {
+ t.Errorf("uint8(su8) != u8")
+ }
+ if int64(si64) != i64 {
+ t.Errorf("int64(si64) != i64")
+ }
+ if int32(si32) != i32 {
+ t.Errorf("int32(si32) != i32")
+ }
+ if int16(si16) != i16 {
+ t.Errorf("int16(si16) != i16")
+ }
+ if int8(si8) != i8 {
+ t.Errorf("int8(si8) != i8")
+ }
+}
+
+func TestFloat32StoreToLoadConstantFold(t *testing.T) {
+ // Test that math.Float32{,from}bits constant fold correctly.
+ // In particular we need to be careful that signaling NaN (sNaN) values
+ // are not converted to quiet NaN (qNaN) values during compilation.
+ // See issue #27193 for more information.
+
+ // signaling NaNs
+ {
+ const nan = uint32(0x7f800001) // sNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0x7fbfffff) // sNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0xff800001) // sNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0xffbfffff) // sNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+
+ // quiet NaNs
+ {
+ const nan = uint32(0x7fc00000) // qNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0x7fffffff) // qNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0x8fc00000) // qNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+ {
+ const nan = uint32(0x8fffffff) // qNaN
+ if x := math.Float32bits(math.Float32frombits(nan)); x != nan {
+ t.Errorf("got %#x, want %#x", x, nan)
+ }
+ }
+
+ // infinities
+ {
+ const inf = uint32(0x7f800000) // +∞
+ if x := math.Float32bits(math.Float32frombits(inf)); x != inf {
+ t.Errorf("got %#x, want %#x", x, inf)
+ }
+ }
+ {
+ const negInf = uint32(0xff800000) // -∞
+ if x := math.Float32bits(math.Float32frombits(negInf)); x != negInf {
+ t.Errorf("got %#x, want %#x", x, negInf)
+ }
+ }
+
+ // numbers
+ {
+ const zero = uint32(0) // +0.0
+ if x := math.Float32bits(math.Float32frombits(zero)); x != zero {
+ t.Errorf("got %#x, want %#x", x, zero)
+ }
+ }
+ {
+ const negZero = uint32(1 << 31) // -0.0
+ if x := math.Float32bits(math.Float32frombits(negZero)); x != negZero {
+ t.Errorf("got %#x, want %#x", x, negZero)
+ }
+ }
+ {
+ const one = uint32(0x3f800000) // 1.0
+ if x := math.Float32bits(math.Float32frombits(one)); x != one {
+ t.Errorf("got %#x, want %#x", x, one)
+ }
+ }
+ {
+ const negOne = uint32(0xbf800000) // -1.0
+ if x := math.Float32bits(math.Float32frombits(negOne)); x != negOne {
+ t.Errorf("got %#x, want %#x", x, negOne)
+ }
+ }
+ {
+ const frac = uint32(0x3fc00000) // +1.5
+ if x := math.Float32bits(math.Float32frombits(frac)); x != frac {
+ t.Errorf("got %#x, want %#x", x, frac)
+ }
+ }
+ {
+ const negFrac = uint32(0xbfc00000) // -1.5
+ if x := math.Float32bits(math.Float32frombits(negFrac)); x != negFrac {
+ t.Errorf("got %#x, want %#x", x, negFrac)
+ }
+ }
+}
+
+// Signaling NaN values as constants.
+const (
+ snan32bits uint32 = 0x7f800001
+ snan64bits uint64 = 0x7ff0000000000001
+)
+
+// Signaling NaNs as variables.
+var snan32bitsVar uint32 = snan32bits
+var snan64bitsVar uint64 = snan64bits
+
+func TestFloatSignalingNaN(t *testing.T) {
+ // Make sure we generate a signaling NaN from a constant properly.
+ // See issue 36400.
+ f32 := math.Float32frombits(snan32bits)
+ g32 := math.Float32frombits(snan32bitsVar)
+ x32 := math.Float32bits(f32)
+ y32 := math.Float32bits(g32)
+ if x32 != y32 {
+ t.Errorf("got %x, want %x (diff=%x)", x32, y32, x32^y32)
+ }
+
+ f64 := math.Float64frombits(snan64bits)
+ g64 := math.Float64frombits(snan64bitsVar)
+ x64 := math.Float64bits(f64)
+ y64 := math.Float64bits(g64)
+ if x64 != y64 {
+ t.Errorf("got %x, want %x (diff=%x)", x64, y64, x64^y64)
+ }
+}
+
+func TestFloatSignalingNaNConversion(t *testing.T) {
+ // Test to make sure when we convert a signaling NaN, we get a NaN.
+ // (Ideally we want a quiet NaN, but some platforms don't agree.)
+ // See issue 36399.
+ s32 := math.Float32frombits(snan32bitsVar)
+ if s32 == s32 {
+ t.Errorf("converting a NaN did not result in a NaN")
+ }
+ s64 := math.Float64frombits(snan64bitsVar)
+ if s64 == s64 {
+ t.Errorf("converting a NaN did not result in a NaN")
+ }
+}
+
+func TestFloatSignalingNaNConversionConst(t *testing.T) {
+ // Test to make sure when we convert a signaling NaN, it converts to a NaN.
+ // (Ideally we want a quiet NaN, but some platforms don't agree.)
+ // See issue 36399 and 36400.
+ s32 := math.Float32frombits(snan32bits)
+ if s32 == s32 {
+ t.Errorf("converting a NaN did not result in a NaN")
+ }
+ s64 := math.Float64frombits(snan64bits)
+ if s64 == s64 {
+ t.Errorf("converting a NaN did not result in a NaN")
+ }
+}
+
+var sinkFloat float64
+
+func BenchmarkMul2(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ var m float64 = 1
+ for j := 0; j < 500; j++ {
+ m *= 2
+ }
+ sinkFloat = m
+ }
+}
+func BenchmarkMulNeg2(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ var m float64 = 1
+ for j := 0; j < 500; j++ {
+ m *= -2
+ }
+ sinkFloat = m
+ }
+}
diff --git a/src/cmd/compile/internal/test/global_test.go b/src/cmd/compile/internal/test/global_test.go
new file mode 100644
index 0000000..c8b3370
--- /dev/null
+++ b/src/cmd/compile/internal/test/global_test.go
@@ -0,0 +1,106 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bytes"
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+)
+
+// Make sure "hello world" does not link in all the
+// fmt.scanf routines. See issue 6853.
+func TestScanfRemoval(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ t.Parallel()
+
+ // Make a directory to work in.
+ dir := t.TempDir()
+
+ // Create source.
+ src := filepath.Join(dir, "test.go")
+ f, err := os.Create(src)
+ if err != nil {
+ t.Fatalf("could not create source file: %v", err)
+ }
+ f.Write([]byte(`
+package main
+import "fmt"
+func main() {
+ fmt.Println("hello world")
+}
+`))
+ f.Close()
+
+ // Name of destination.
+ dst := filepath.Join(dir, "test")
+
+ // Compile source.
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-o", dst, src)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("could not build target: %v\n%s", err, out)
+ }
+
+ // Check destination to see if scanf code was included.
+ cmd = testenv.Command(t, testenv.GoToolPath(t), "tool", "nm", dst)
+ out, err = cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("could not read target: %v", err)
+ }
+ if bytes.Contains(out, []byte("scanInt")) {
+ t.Fatalf("scanf code not removed from helloworld")
+ }
+}
+
+// Make sure -S prints assembly code. See issue 14515.
+func TestDashS(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ t.Parallel()
+
+ // Make a directory to work in.
+ dir := t.TempDir()
+
+ // Create source.
+ src := filepath.Join(dir, "test.go")
+ f, err := os.Create(src)
+ if err != nil {
+ t.Fatalf("could not create source file: %v", err)
+ }
+ f.Write([]byte(`
+package main
+import "fmt"
+func main() {
+ fmt.Println("hello world")
+}
+`))
+ f.Close()
+
+ // Compile source.
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-gcflags", "-S", "-o", filepath.Join(dir, "test"), src)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("could not build target: %v\n%s", err, out)
+ }
+
+ patterns := []string{
+ // It is hard to look for actual instructions in an
+ // arch-independent way. So we'll just look for
+ // pseudo-ops that are arch-independent.
+ "\tTEXT\t",
+ "\tFUNCDATA\t",
+ "\tPCDATA\t",
+ }
+ outstr := string(out)
+ for _, p := range patterns {
+ if !strings.Contains(outstr, p) {
+ println(outstr)
+ panic("can't find pattern " + p)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/iface_test.go b/src/cmd/compile/internal/test/iface_test.go
new file mode 100644
index 0000000..ebc4f89
--- /dev/null
+++ b/src/cmd/compile/internal/test/iface_test.go
@@ -0,0 +1,126 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import "testing"
+
+// Test to make sure we make copies of the values we
+// put in interfaces.
+
+var x int
+
+func TestEfaceConv1(t *testing.T) {
+ a := 5
+ i := interface{}(a)
+ a += 2
+ if got := i.(int); got != 5 {
+ t.Errorf("wanted 5, got %d\n", got)
+ }
+}
+
+func TestEfaceConv2(t *testing.T) {
+ a := 5
+ sink = &a
+ i := interface{}(a)
+ a += 2
+ if got := i.(int); got != 5 {
+ t.Errorf("wanted 5, got %d\n", got)
+ }
+}
+
+func TestEfaceConv3(t *testing.T) {
+ x = 5
+ if got := e2int3(x); got != 5 {
+ t.Errorf("wanted 5, got %d\n", got)
+ }
+}
+
+//go:noinline
+func e2int3(i interface{}) int {
+ x = 7
+ return i.(int)
+}
+
+func TestEfaceConv4(t *testing.T) {
+ a := 5
+ if got := e2int4(a, &a); got != 5 {
+ t.Errorf("wanted 5, got %d\n", got)
+ }
+}
+
+//go:noinline
+func e2int4(i interface{}, p *int) int {
+ *p = 7
+ return i.(int)
+}
+
+type Int int
+
+var y Int
+
+type I interface {
+ foo()
+}
+
+func (i Int) foo() {
+}
+
+func TestIfaceConv1(t *testing.T) {
+ a := Int(5)
+ i := interface{}(a)
+ a += 2
+ if got := i.(Int); got != 5 {
+ t.Errorf("wanted 5, got %d\n", int(got))
+ }
+}
+
+func TestIfaceConv2(t *testing.T) {
+ a := Int(5)
+ sink = &a
+ i := interface{}(a)
+ a += 2
+ if got := i.(Int); got != 5 {
+ t.Errorf("wanted 5, got %d\n", int(got))
+ }
+}
+
+func TestIfaceConv3(t *testing.T) {
+ y = 5
+ if got := i2Int3(y); got != 5 {
+ t.Errorf("wanted 5, got %d\n", int(got))
+ }
+}
+
+//go:noinline
+func i2Int3(i I) Int {
+ y = 7
+ return i.(Int)
+}
+
+func TestIfaceConv4(t *testing.T) {
+ a := Int(5)
+ if got := i2Int4(a, &a); got != 5 {
+ t.Errorf("wanted 5, got %d\n", int(got))
+ }
+}
+
+//go:noinline
+func i2Int4(i I, p *Int) Int {
+ *p = 7
+ return i.(Int)
+}
+
+func BenchmarkEfaceInteger(b *testing.B) {
+ sum := 0
+ for i := 0; i < b.N; i++ {
+ sum += i2int(i)
+ }
+ sink = sum
+}
+
+//go:noinline
+func i2int(i interface{}) int {
+ return i.(int)
+}
diff --git a/src/cmd/compile/internal/test/inl_test.go b/src/cmd/compile/internal/test/inl_test.go
new file mode 100644
index 0000000..205b746
--- /dev/null
+++ b/src/cmd/compile/internal/test/inl_test.go
@@ -0,0 +1,396 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bufio"
+ "internal/goexperiment"
+ "internal/testenv"
+ "io"
+ "math/bits"
+ "regexp"
+ "runtime"
+ "strings"
+ "testing"
+)
+
+// TestIntendedInlining tests that specific functions are inlined.
+// This allows refactoring for code clarity and re-use without fear that
+// changes to the compiler will cause silent performance regressions.
+func TestIntendedInlining(t *testing.T) {
+ if testing.Short() && testenv.Builder() == "" {
+ t.Skip("skipping in short mode")
+ }
+ testenv.MustHaveGoRun(t)
+ t.Parallel()
+
+ // want is the list of function names (by package) that should
+ // be inlinable. If they have no callers in their packages, they
+ // might not actually be inlined anywhere.
+ want := map[string][]string{
+ "runtime": {
+ "add",
+ "acquirem",
+ "add1",
+ "addb",
+ "adjustpanics",
+ "adjustpointer",
+ "alignDown",
+ "alignUp",
+ "bucketMask",
+ "bucketShift",
+ "chanbuf",
+ "evacuated",
+ "fastlog2",
+ "fastrand",
+ "float64bits",
+ "funcspdelta",
+ "getm",
+ "getMCache",
+ "isDirectIface",
+ "itabHashFunc",
+ "noescape",
+ "pcvalueCacheKey",
+ "readUnaligned32",
+ "readUnaligned64",
+ "releasem",
+ "roundupsize",
+ "stackmapdata",
+ "stringStructOf",
+ "subtract1",
+ "subtractb",
+ "tophash",
+ "(*bmap).keys",
+ "(*bmap).overflow",
+ "(*waitq).enqueue",
+ "funcInfo.entry",
+
+ // GC-related ones
+ "cgoInRange",
+ "gclinkptr.ptr",
+ "guintptr.ptr",
+ "writeHeapBitsForAddr",
+ "markBits.isMarked",
+ "muintptr.ptr",
+ "puintptr.ptr",
+ "spanOf",
+ "spanOfUnchecked",
+ "(*gcWork).putFast",
+ "(*gcWork).tryGetFast",
+ "(*guintptr).set",
+ "(*markBits).advance",
+ "(*mspan).allocBitsForIndex",
+ "(*mspan).base",
+ "(*mspan).markBitsForBase",
+ "(*mspan).markBitsForIndex",
+ "(*muintptr).set",
+ "(*puintptr).set",
+ "(*wbBuf).get1",
+ "(*wbBuf).get2",
+ },
+ "runtime/internal/sys": {},
+ "runtime/internal/math": {
+ "MulUintptr",
+ },
+ "bytes": {
+ "(*Buffer).Bytes",
+ "(*Buffer).Cap",
+ "(*Buffer).Len",
+ "(*Buffer).Grow",
+ "(*Buffer).Next",
+ "(*Buffer).Read",
+ "(*Buffer).ReadByte",
+ "(*Buffer).Reset",
+ "(*Buffer).String",
+ "(*Buffer).UnreadByte",
+ "(*Buffer).tryGrowByReslice",
+ },
+ "compress/flate": {
+ "byLiteral.Len",
+ "byLiteral.Less",
+ "byLiteral.Swap",
+ "(*dictDecoder).tryWriteCopy",
+ },
+ "encoding/base64": {
+ "assemble32",
+ "assemble64",
+ },
+ "unicode/utf8": {
+ "FullRune",
+ "FullRuneInString",
+ "RuneLen",
+ "AppendRune",
+ "ValidRune",
+ },
+ "unicode/utf16": {
+ "Decode",
+ },
+ "reflect": {
+ "Value.Bool",
+ "Value.Bytes",
+ "Value.CanAddr",
+ "Value.CanComplex",
+ "Value.CanFloat",
+ "Value.CanInt",
+ "Value.CanInterface",
+ "Value.CanSet",
+ "Value.CanUint",
+ "Value.Cap",
+ "Value.Complex",
+ "Value.Float",
+ "Value.Int",
+ "Value.Interface",
+ "Value.IsNil",
+ "Value.IsValid",
+ "Value.Kind",
+ "Value.Len",
+ "Value.MapRange",
+ "Value.OverflowComplex",
+ "Value.OverflowFloat",
+ "Value.OverflowInt",
+ "Value.OverflowUint",
+ "Value.String",
+ "Value.Type",
+ "Value.Uint",
+ "Value.UnsafeAddr",
+ "Value.pointer",
+ "add",
+ "align",
+ "flag.mustBe",
+ "flag.mustBeAssignable",
+ "flag.mustBeExported",
+ "flag.kind",
+ "flag.ro",
+ },
+ "regexp": {
+ "(*bitState).push",
+ },
+ "math/big": {
+ "bigEndianWord",
+ // The following functions require the math_big_pure_go build tag.
+ "addVW",
+ "subVW",
+ },
+ "math/rand": {
+ "(*rngSource).Int63",
+ "(*rngSource).Uint64",
+ },
+ "net": {
+ "(*UDPConn).ReadFromUDP",
+ },
+ "sync": {
+ // Both OnceFunc and its returned closure need to be inlinable so
+ // that the returned closure can be inlined into the caller of OnceFunc.
+ "OnceFunc",
+ "OnceFunc.func2", // The returned closure.
+ // TODO(austin): It would be good to check OnceValue and OnceValues,
+ // too, but currently they aren't reported because they have type
+ // parameters and aren't instantiated in sync.
+ },
+ "sync/atomic": {
+ // (*Bool).CompareAndSwap handled below.
+ "(*Bool).Load",
+ "(*Bool).Store",
+ "(*Bool).Swap",
+ "(*Int32).Add",
+ "(*Int32).CompareAndSwap",
+ "(*Int32).Load",
+ "(*Int32).Store",
+ "(*Int32).Swap",
+ "(*Int64).Add",
+ "(*Int64).CompareAndSwap",
+ "(*Int64).Load",
+ "(*Int64).Store",
+ "(*Int64).Swap",
+ "(*Uint32).Add",
+ "(*Uint32).CompareAndSwap",
+ "(*Uint32).Load",
+ "(*Uint32).Store",
+ "(*Uint32).Swap",
+ "(*Uint64).Add",
+ "(*Uint64).CompareAndSwap",
+ "(*Uint64).Load",
+ "(*Uint64).Store",
+ "(*Uint64).Swap",
+ "(*Uintptr).Add",
+ "(*Uintptr).CompareAndSwap",
+ "(*Uintptr).Load",
+ "(*Uintptr).Store",
+ "(*Uintptr).Swap",
+ "(*Pointer[go.shape.int]).CompareAndSwap",
+ "(*Pointer[go.shape.int]).Load",
+ "(*Pointer[go.shape.int]).Store",
+ "(*Pointer[go.shape.int]).Swap",
+ },
+ }
+
+ if runtime.GOARCH != "386" && runtime.GOARCH != "loong64" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" && runtime.GOARCH != "riscv64" {
+ // nextFreeFast calls sys.TrailingZeros64, 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 loong64, mips64x and riscv64, TrailingZeros64 is not intrinsified and causes nextFreeFast
+ // too expensive to inline (Issue 22239).
+ want["runtime"] = append(want["runtime"], "nextFreeFast")
+ // Same behavior for heapBits.nextFast.
+ want["runtime"] = append(want["runtime"], "heapBits.nextFast")
+ }
+ if runtime.GOARCH != "386" {
+ // As explained above, TrailingZeros64 and TrailingZeros32 are not Go code on 386.
+ // The same applies to Bswap32.
+ want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros64")
+ want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros32")
+ want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Bswap32")
+ }
+ if bits.UintSize == 64 {
+ // mix is only defined on 64-bit architectures
+ want["runtime"] = append(want["runtime"], "mix")
+ // (*Bool).CompareAndSwap is just over budget on 32-bit systems (386, arm).
+ want["sync/atomic"] = append(want["sync/atomic"], "(*Bool).CompareAndSwap")
+ }
+
+ switch runtime.GOARCH {
+ 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
+ // the inlining budget. Move back to the main table once that
+ // problem is solved.
+ want["sync"] = []string{
+ "(*Mutex).Lock",
+ "(*Mutex).Unlock",
+ "(*RWMutex).RLock",
+ "(*RWMutex).RUnlock",
+ "(*Once).Do",
+ }
+ }
+
+ // Functions that must actually be inlined; they must have actual callers.
+ must := map[string]bool{
+ "compress/flate.byLiteral.Len": true,
+ "compress/flate.byLiteral.Less": true,
+ "compress/flate.byLiteral.Swap": true,
+ }
+
+ notInlinedReason := make(map[string]string)
+ pkgs := make([]string, 0, len(want))
+ for pname, fnames := range want {
+ pkgs = append(pkgs, pname)
+ for _, fname := range fnames {
+ fullName := pname + "." + fname
+ if _, ok := notInlinedReason[fullName]; ok {
+ t.Errorf("duplicate func: %s", fullName)
+ }
+ notInlinedReason[fullName] = "unknown reason"
+ }
+ }
+
+ args := append([]string{"build", "-gcflags=-m -m", "-tags=math_big_pure_go"}, pkgs...)
+ cmd := testenv.CleanCmdEnv(testenv.Command(t, testenv.GoToolPath(t), args...))
+ pr, pw := io.Pipe()
+ cmd.Stdout = pw
+ cmd.Stderr = pw
+ cmdErr := make(chan error, 1)
+ go func() {
+ cmdErr <- cmd.Run()
+ pw.Close()
+ }()
+ scanner := bufio.NewScanner(pr)
+ curPkg := ""
+ canInline := regexp.MustCompile(`: can inline ([^ ]*)`)
+ haveInlined := regexp.MustCompile(`: inlining call to ([^ ]*)`)
+ cannotInline := regexp.MustCompile(`: cannot inline ([^ ]*): (.*)`)
+ for scanner.Scan() {
+ line := scanner.Text()
+ if strings.HasPrefix(line, "# ") {
+ curPkg = line[2:]
+ continue
+ }
+ if m := haveInlined.FindStringSubmatch(line); m != nil {
+ fname := m[1]
+ delete(notInlinedReason, curPkg+"."+fname)
+ continue
+ }
+ if m := canInline.FindStringSubmatch(line); m != nil {
+ fname := m[1]
+ fullname := curPkg + "." + fname
+ // If function must be inlined somewhere, being inlinable is not enough
+ if _, ok := must[fullname]; !ok {
+ delete(notInlinedReason, fullname)
+ continue
+ }
+ }
+ if m := cannotInline.FindStringSubmatch(line); m != nil {
+ fname, reason := m[1], m[2]
+ fullName := curPkg + "." + fname
+ if _, ok := notInlinedReason[fullName]; ok {
+ // cmd/compile gave us a reason why
+ notInlinedReason[fullName] = reason
+ }
+ continue
+ }
+ }
+ if err := <-cmdErr; err != nil {
+ t.Fatal(err)
+ }
+ if err := scanner.Err(); err != nil {
+ t.Fatal(err)
+ }
+ for fullName, reason := range notInlinedReason {
+ t.Errorf("%s was not inlined: %s", fullName, reason)
+ }
+}
+
+func collectInlCands(msgs string) map[string]struct{} {
+ rv := make(map[string]struct{})
+ lines := strings.Split(msgs, "\n")
+ re := regexp.MustCompile(`^\S+\s+can\s+inline\s+(\S+)`)
+ for _, line := range lines {
+ m := re.FindStringSubmatch(line)
+ if m != nil {
+ rv[m[1]] = struct{}{}
+ }
+ }
+ return rv
+}
+
+func TestIssue56044(t *testing.T) {
+ if testing.Short() {
+ t.Skipf("skipping test: too long for short mode")
+ }
+ if !goexperiment.CoverageRedesign {
+ t.Skipf("skipping new coverage tests (experiment not enabled)")
+ }
+
+ testenv.MustHaveGoBuild(t)
+
+ modes := []string{"-covermode=set", "-covermode=atomic"}
+
+ for _, mode := range modes {
+ // Build the Go runtime with "-m", capturing output.
+ args := []string{"build", "-gcflags=runtime=-m", "runtime"}
+ cmd := testenv.Command(t, testenv.GoToolPath(t), args...)
+ b, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("build failed (%v): %s", err, b)
+ }
+ mbase := collectInlCands(string(b))
+
+ // Redo the build with -cover, also with "-m".
+ args = []string{"build", "-gcflags=runtime=-m", mode, "runtime"}
+ cmd = testenv.Command(t, testenv.GoToolPath(t), args...)
+ b, err = cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("build failed (%v): %s", err, b)
+ }
+ mcov := collectInlCands(string(b))
+
+ // Make sure that there aren't any functions that are marked
+ // as inline candidates at base but not with coverage.
+ for k := range mbase {
+ if _, ok := mcov[k]; !ok {
+ t.Errorf("error: did not find %s in coverage -m output", k)
+ }
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/inst_test.go b/src/cmd/compile/internal/test/inst_test.go
new file mode 100644
index 0000000..069e2ff
--- /dev/null
+++ b/src/cmd/compile/internal/test/inst_test.go
@@ -0,0 +1,60 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "regexp"
+ "testing"
+)
+
+// TestInst tests that only one instantiation of Sort is created, even though generic
+// Sort is used for multiple pointer types across two packages.
+func TestInst(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ testenv.MustHaveGoRun(t)
+
+ // Build ptrsort.go, which uses package mysort.
+ var output []byte
+ var err error
+ filename := "ptrsort.go"
+ exename := "ptrsort"
+ outname := "ptrsort.out"
+ gotool := testenv.GoToolPath(t)
+ dest := filepath.Join(t.TempDir(), exename)
+ cmd := testenv.Command(t, gotool, "build", "-o", dest, filepath.Join("testdata", filename))
+ if output, err = cmd.CombinedOutput(); err != nil {
+ t.Fatalf("Failed: %v:\nOutput: %s\n", err, output)
+ }
+
+ // Test that there is exactly one shape-based instantiation of Sort in
+ // the executable.
+ cmd = testenv.Command(t, gotool, "tool", "nm", dest)
+ if output, err = cmd.CombinedOutput(); err != nil {
+ t.Fatalf("Failed: %v:\nOut: %s\n", err, output)
+ }
+ // Look for shape-based instantiation of Sort, but ignore any extra wrapper
+ // ending in "-tramp" (which are created on riscv).
+ re := regexp.MustCompile(`\bSort\[.*shape.*\][^-]`)
+ r := re.FindAllIndex(output, -1)
+ if len(r) != 1 {
+ t.Fatalf("Wanted 1 instantiations of Sort function, got %d\n", len(r))
+ }
+
+ // Actually run the test and make sure output is correct.
+ cmd = testenv.Command(t, gotool, "run", filepath.Join("testdata", filename))
+ if output, err = cmd.CombinedOutput(); err != nil {
+ t.Fatalf("Failed: %v:\nOut: %s\n", err, output)
+ }
+ out, err := os.ReadFile(filepath.Join("testdata", outname))
+ if err != nil {
+ t.Fatalf("Could not find %s\n", outname)
+ }
+ if string(out) != string(output) {
+ t.Fatalf("Wanted output %v, got %v\n", string(out), string(output))
+ }
+}
diff --git a/src/cmd/compile/internal/test/intrinsics_test.go b/src/cmd/compile/internal/test/intrinsics_test.go
new file mode 100644
index 0000000..b89198c
--- /dev/null
+++ b/src/cmd/compile/internal/test/intrinsics_test.go
@@ -0,0 +1,62 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "math/bits"
+ "testing"
+)
+
+func TestBitLen64(t *testing.T) {
+ for i := 0; i <= 64; i++ {
+ got := bits.Len64(1 << i)
+ want := i + 1
+ if want == 65 {
+ want = 0
+ }
+ if got != want {
+ t.Errorf("Len64(1<<%d) = %d, want %d", i, got, want)
+ }
+ }
+}
+
+func TestBitLen32(t *testing.T) {
+ for i := 0; i <= 32; i++ {
+ got := bits.Len32(1 << i)
+ want := i + 1
+ if want == 33 {
+ want = 0
+ }
+ if got != want {
+ t.Errorf("Len32(1<<%d) = %d, want %d", i, got, want)
+ }
+ }
+}
+
+func TestBitLen16(t *testing.T) {
+ for i := 0; i <= 16; i++ {
+ got := bits.Len16(1 << i)
+ want := i + 1
+ if want == 17 {
+ want = 0
+ }
+ if got != want {
+ t.Errorf("Len16(1<<%d) = %d, want %d", i, got, want)
+ }
+ }
+}
+
+func TestBitLen8(t *testing.T) {
+ for i := 0; i <= 8; i++ {
+ got := bits.Len8(1 << i)
+ want := i + 1
+ if want == 9 {
+ want = 0
+ }
+ if got != want {
+ t.Errorf("Len8(1<<%d) = %d, want %d", i, got, want)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/issue50182_test.go b/src/cmd/compile/internal/test/issue50182_test.go
new file mode 100644
index 0000000..cd277fa
--- /dev/null
+++ b/src/cmd/compile/internal/test/issue50182_test.go
@@ -0,0 +1,62 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "fmt"
+ "sort"
+ "testing"
+)
+
+// Test that calling methods on generic types doesn't cause allocations.
+func genericSorted[T sort.Interface](data T) bool {
+ n := data.Len()
+ for i := n - 1; i > 0; i-- {
+ if data.Less(i, i-1) {
+ return false
+ }
+ }
+ return true
+}
+func TestGenericSorted(t *testing.T) {
+ var data = sort.IntSlice{-10, -5, 0, 1, 2, 3, 5, 7, 11, 100, 100, 100, 1000, 10000}
+ f := func() {
+ genericSorted(data)
+ }
+ if n := testing.AllocsPerRun(10, f); n > 0 {
+ t.Errorf("got %f allocs, want 0", n)
+ }
+}
+
+// Test that escape analysis correctly tracks escaping inside of methods
+// called on generic types.
+type fooer interface {
+ foo()
+}
+type P struct {
+ p *int
+ q int
+}
+
+var esc []*int
+
+func (p P) foo() {
+ esc = append(esc, p.p) // foo escapes the pointer from inside of p
+}
+func f[T fooer](t T) {
+ t.foo()
+}
+func TestGenericEscape(t *testing.T) {
+ for i := 0; i < 4; i++ {
+ var x int = 77 + i
+ var p P = P{p: &x}
+ f(p)
+ }
+ for i, p := range esc {
+ if got, want := *p, 77+i; got != want {
+ panic(fmt.Sprintf("entry %d: got %d, want %d", i, got, want))
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/issue53888_test.go b/src/cmd/compile/internal/test/issue53888_test.go
new file mode 100644
index 0000000..0d5b13b
--- /dev/null
+++ b/src/cmd/compile/internal/test/issue53888_test.go
@@ -0,0 +1,46 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !race
+
+package test
+
+import (
+ "internal/testenv"
+ "testing"
+)
+
+func TestAppendOfMake(t *testing.T) {
+ testenv.SkipIfOptimizationOff(t)
+ for n := 32; n < 33; n++ { // avoid stack allocation of make()
+ b := make([]byte, n)
+ f := func() {
+ b = append(b[:0], make([]byte, n)...)
+ }
+ if n := testing.AllocsPerRun(10, f); n > 0 {
+ t.Errorf("got %f allocs, want 0", n)
+ }
+ type S []byte
+
+ s := make(S, n)
+ g := func() {
+ s = append(s[:0], make(S, n)...)
+ }
+ if n := testing.AllocsPerRun(10, g); n > 0 {
+ t.Errorf("got %f allocs, want 0", n)
+ }
+ h := func() {
+ s = append(s[:0], make([]byte, n)...)
+ }
+ if n := testing.AllocsPerRun(10, h); n > 0 {
+ t.Errorf("got %f allocs, want 0", n)
+ }
+ i := func() {
+ b = append(b[:0], make(S, n)...)
+ }
+ if n := testing.AllocsPerRun(10, i); n > 0 {
+ t.Errorf("got %f allocs, want 0", n)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/issue57434_test.go b/src/cmd/compile/internal/test/issue57434_test.go
new file mode 100644
index 0000000..6a34b54
--- /dev/null
+++ b/src/cmd/compile/internal/test/issue57434_test.go
@@ -0,0 +1,38 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "testing"
+)
+
+var output int
+
+type Object struct {
+ Val int
+}
+
+func (o *Object) Initialize() *Object {
+ o.Val = 5
+ return o
+}
+
+func (o *Object) Update() *Object {
+ o.Val = o.Val + 1
+ return o
+}
+
+func TestAutotmpLoopDepth(t *testing.T) {
+ f := func() {
+ for i := 0; i < 10; i++ {
+ var obj Object
+ obj.Initialize().Update()
+ output = obj.Val
+ }
+ }
+ if n := testing.AllocsPerRun(10, f); n > 0 {
+ t.Error("obj moved to heap")
+ }
+}
diff --git a/src/cmd/compile/internal/test/lang_test.go b/src/cmd/compile/internal/test/lang_test.go
new file mode 100644
index 0000000..34ed378
--- /dev/null
+++ b/src/cmd/compile/internal/test/lang_test.go
@@ -0,0 +1,58 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+const aliasSrc = `
+package x
+
+type T = int
+`
+
+func TestInvalidLang(t *testing.T) {
+ t.Parallel()
+
+ testenv.MustHaveGoBuild(t)
+
+ dir := t.TempDir()
+
+ src := filepath.Join(dir, "alias.go")
+ if err := os.WriteFile(src, []byte(aliasSrc), 0644); err != nil {
+ t.Fatal(err)
+ }
+
+ outfile := filepath.Join(dir, "alias.o")
+
+ if testLang(t, "go9.99", src, outfile) == nil {
+ t.Error("compilation with -lang=go9.99 succeeded unexpectedly")
+ }
+
+ // This test will have to be adjusted if we ever reach 1.99 or 2.0.
+ if testLang(t, "go1.99", src, outfile) == nil {
+ t.Error("compilation with -lang=go1.99 succeeded unexpectedly")
+ }
+
+ if testLang(t, "go1.8", src, outfile) == nil {
+ t.Error("compilation with -lang=go1.8 succeeded unexpectedly")
+ }
+
+ if err := testLang(t, "go1.9", src, outfile); err != nil {
+ t.Errorf("compilation with -lang=go1.9 failed unexpectedly: %v", err)
+ }
+}
+
+func testLang(t *testing.T, lang, src, outfile string) error {
+ run := []string{testenv.GoToolPath(t), "tool", "compile", "-p=p", "-lang", lang, "-o", outfile, src}
+ t.Log(run)
+ out, err := testenv.Command(t, run[0], run[1:]...).CombinedOutput()
+ t.Logf("%s", out)
+ return err
+}
diff --git a/src/cmd/compile/internal/test/logic_test.go b/src/cmd/compile/internal/test/logic_test.go
new file mode 100644
index 0000000..1d7043f
--- /dev/null
+++ b/src/cmd/compile/internal/test/logic_test.go
@@ -0,0 +1,289 @@
+package test
+
+import "testing"
+
+// Tests to make sure logic simplification rules are correct.
+
+func TestLogic64(t *testing.T) {
+ // test values to determine function equality
+ values := [...]int64{-1 << 63, 1<<63 - 1, -4, -3, -2, -1, 0, 1, 2, 3, 4}
+
+ // golden functions we use repeatedly
+ zero := func(x int64) int64 { return 0 }
+ id := func(x int64) int64 { return x }
+ or := func(x, y int64) int64 { return x | y }
+ and := func(x, y int64) int64 { return x & y }
+ y := func(x, y int64) int64 { return y }
+
+ for _, test := range [...]struct {
+ name string
+ f func(int64) int64
+ golden func(int64) int64
+ }{
+ {"x|x", func(x int64) int64 { return x | x }, id},
+ {"x|0", func(x int64) int64 { return x | 0 }, id},
+ {"x|-1", func(x int64) int64 { return x | -1 }, func(x int64) int64 { return -1 }},
+ {"x&x", func(x int64) int64 { return x & x }, id},
+ {"x&0", func(x int64) int64 { return x & 0 }, zero},
+ {"x&-1", func(x int64) int64 { return x & -1 }, id},
+ {"x^x", func(x int64) int64 { return x ^ x }, zero},
+ {"x^0", func(x int64) int64 { return x ^ 0 }, id},
+ {"x^-1", func(x int64) int64 { return x ^ -1 }, func(x int64) int64 { return ^x }},
+ {"x+0", func(x int64) int64 { return x + 0 }, id},
+ {"x-x", func(x int64) int64 { return x - x }, zero},
+ {"x*0", func(x int64) int64 { return x * 0 }, zero},
+ {"^^x", func(x int64) int64 { return ^^x }, id},
+ } {
+ for _, v := range values {
+ got := test.f(v)
+ want := test.golden(v)
+ if want != got {
+ t.Errorf("[%s](%d)=%d, want %d", test.name, v, got, want)
+ }
+ }
+ }
+ for _, test := range [...]struct {
+ name string
+ f func(int64, int64) int64
+ golden func(int64, int64) int64
+ }{
+ {"x|(x|y)", func(x, y int64) int64 { return x | (x | y) }, or},
+ {"x|(y|x)", func(x, y int64) int64 { return x | (y | x) }, or},
+ {"(x|y)|x", func(x, y int64) int64 { return (x | y) | x }, or},
+ {"(y|x)|x", func(x, y int64) int64 { return (y | x) | x }, or},
+ {"x&(x&y)", func(x, y int64) int64 { return x & (x & y) }, and},
+ {"x&(y&x)", func(x, y int64) int64 { return x & (y & x) }, and},
+ {"(x&y)&x", func(x, y int64) int64 { return (x & y) & x }, and},
+ {"(y&x)&x", func(x, y int64) int64 { return (y & x) & x }, and},
+ {"x^(x^y)", func(x, y int64) int64 { return x ^ (x ^ y) }, y},
+ {"x^(y^x)", func(x, y int64) int64 { return x ^ (y ^ x) }, y},
+ {"(x^y)^x", func(x, y int64) int64 { return (x ^ y) ^ x }, y},
+ {"(y^x)^x", func(x, y int64) int64 { return (y ^ x) ^ x }, y},
+ {"-(y-x)", func(x, y int64) int64 { return -(y - x) }, func(x, y int64) int64 { return x - y }},
+ {"(x+y)-x", func(x, y int64) int64 { return (x + y) - x }, y},
+ {"(y+x)-x", func(x, y int64) int64 { return (y + x) - x }, y},
+ } {
+ for _, v := range values {
+ for _, w := range values {
+ got := test.f(v, w)
+ want := test.golden(v, w)
+ if want != got {
+ t.Errorf("[%s](%d,%d)=%d, want %d", test.name, v, w, got, want)
+ }
+ }
+ }
+ }
+}
+
+func TestLogic32(t *testing.T) {
+ // test values to determine function equality
+ values := [...]int32{-1 << 31, 1<<31 - 1, -4, -3, -2, -1, 0, 1, 2, 3, 4}
+
+ // golden functions we use repeatedly
+ zero := func(x int32) int32 { return 0 }
+ id := func(x int32) int32 { return x }
+ or := func(x, y int32) int32 { return x | y }
+ and := func(x, y int32) int32 { return x & y }
+ y := func(x, y int32) int32 { return y }
+
+ for _, test := range [...]struct {
+ name string
+ f func(int32) int32
+ golden func(int32) int32
+ }{
+ {"x|x", func(x int32) int32 { return x | x }, id},
+ {"x|0", func(x int32) int32 { return x | 0 }, id},
+ {"x|-1", func(x int32) int32 { return x | -1 }, func(x int32) int32 { return -1 }},
+ {"x&x", func(x int32) int32 { return x & x }, id},
+ {"x&0", func(x int32) int32 { return x & 0 }, zero},
+ {"x&-1", func(x int32) int32 { return x & -1 }, id},
+ {"x^x", func(x int32) int32 { return x ^ x }, zero},
+ {"x^0", func(x int32) int32 { return x ^ 0 }, id},
+ {"x^-1", func(x int32) int32 { return x ^ -1 }, func(x int32) int32 { return ^x }},
+ {"x+0", func(x int32) int32 { return x + 0 }, id},
+ {"x-x", func(x int32) int32 { return x - x }, zero},
+ {"x*0", func(x int32) int32 { return x * 0 }, zero},
+ {"^^x", func(x int32) int32 { return ^^x }, id},
+ } {
+ for _, v := range values {
+ got := test.f(v)
+ want := test.golden(v)
+ if want != got {
+ t.Errorf("[%s](%d)=%d, want %d", test.name, v, got, want)
+ }
+ }
+ }
+ for _, test := range [...]struct {
+ name string
+ f func(int32, int32) int32
+ golden func(int32, int32) int32
+ }{
+ {"x|(x|y)", func(x, y int32) int32 { return x | (x | y) }, or},
+ {"x|(y|x)", func(x, y int32) int32 { return x | (y | x) }, or},
+ {"(x|y)|x", func(x, y int32) int32 { return (x | y) | x }, or},
+ {"(y|x)|x", func(x, y int32) int32 { return (y | x) | x }, or},
+ {"x&(x&y)", func(x, y int32) int32 { return x & (x & y) }, and},
+ {"x&(y&x)", func(x, y int32) int32 { return x & (y & x) }, and},
+ {"(x&y)&x", func(x, y int32) int32 { return (x & y) & x }, and},
+ {"(y&x)&x", func(x, y int32) int32 { return (y & x) & x }, and},
+ {"x^(x^y)", func(x, y int32) int32 { return x ^ (x ^ y) }, y},
+ {"x^(y^x)", func(x, y int32) int32 { return x ^ (y ^ x) }, y},
+ {"(x^y)^x", func(x, y int32) int32 { return (x ^ y) ^ x }, y},
+ {"(y^x)^x", func(x, y int32) int32 { return (y ^ x) ^ x }, y},
+ {"-(y-x)", func(x, y int32) int32 { return -(y - x) }, func(x, y int32) int32 { return x - y }},
+ {"(x+y)-x", func(x, y int32) int32 { return (x + y) - x }, y},
+ {"(y+x)-x", func(x, y int32) int32 { return (y + x) - x }, y},
+ } {
+ for _, v := range values {
+ for _, w := range values {
+ got := test.f(v, w)
+ want := test.golden(v, w)
+ if want != got {
+ t.Errorf("[%s](%d,%d)=%d, want %d", test.name, v, w, got, want)
+ }
+ }
+ }
+ }
+}
+
+func TestLogic16(t *testing.T) {
+ // test values to determine function equality
+ values := [...]int16{-1 << 15, 1<<15 - 1, -4, -3, -2, -1, 0, 1, 2, 3, 4}
+
+ // golden functions we use repeatedly
+ zero := func(x int16) int16 { return 0 }
+ id := func(x int16) int16 { return x }
+ or := func(x, y int16) int16 { return x | y }
+ and := func(x, y int16) int16 { return x & y }
+ y := func(x, y int16) int16 { return y }
+
+ for _, test := range [...]struct {
+ name string
+ f func(int16) int16
+ golden func(int16) int16
+ }{
+ {"x|x", func(x int16) int16 { return x | x }, id},
+ {"x|0", func(x int16) int16 { return x | 0 }, id},
+ {"x|-1", func(x int16) int16 { return x | -1 }, func(x int16) int16 { return -1 }},
+ {"x&x", func(x int16) int16 { return x & x }, id},
+ {"x&0", func(x int16) int16 { return x & 0 }, zero},
+ {"x&-1", func(x int16) int16 { return x & -1 }, id},
+ {"x^x", func(x int16) int16 { return x ^ x }, zero},
+ {"x^0", func(x int16) int16 { return x ^ 0 }, id},
+ {"x^-1", func(x int16) int16 { return x ^ -1 }, func(x int16) int16 { return ^x }},
+ {"x+0", func(x int16) int16 { return x + 0 }, id},
+ {"x-x", func(x int16) int16 { return x - x }, zero},
+ {"x*0", func(x int16) int16 { return x * 0 }, zero},
+ {"^^x", func(x int16) int16 { return ^^x }, id},
+ } {
+ for _, v := range values {
+ got := test.f(v)
+ want := test.golden(v)
+ if want != got {
+ t.Errorf("[%s](%d)=%d, want %d", test.name, v, got, want)
+ }
+ }
+ }
+ for _, test := range [...]struct {
+ name string
+ f func(int16, int16) int16
+ golden func(int16, int16) int16
+ }{
+ {"x|(x|y)", func(x, y int16) int16 { return x | (x | y) }, or},
+ {"x|(y|x)", func(x, y int16) int16 { return x | (y | x) }, or},
+ {"(x|y)|x", func(x, y int16) int16 { return (x | y) | x }, or},
+ {"(y|x)|x", func(x, y int16) int16 { return (y | x) | x }, or},
+ {"x&(x&y)", func(x, y int16) int16 { return x & (x & y) }, and},
+ {"x&(y&x)", func(x, y int16) int16 { return x & (y & x) }, and},
+ {"(x&y)&x", func(x, y int16) int16 { return (x & y) & x }, and},
+ {"(y&x)&x", func(x, y int16) int16 { return (y & x) & x }, and},
+ {"x^(x^y)", func(x, y int16) int16 { return x ^ (x ^ y) }, y},
+ {"x^(y^x)", func(x, y int16) int16 { return x ^ (y ^ x) }, y},
+ {"(x^y)^x", func(x, y int16) int16 { return (x ^ y) ^ x }, y},
+ {"(y^x)^x", func(x, y int16) int16 { return (y ^ x) ^ x }, y},
+ {"-(y-x)", func(x, y int16) int16 { return -(y - x) }, func(x, y int16) int16 { return x - y }},
+ {"(x+y)-x", func(x, y int16) int16 { return (x + y) - x }, y},
+ {"(y+x)-x", func(x, y int16) int16 { return (y + x) - x }, y},
+ } {
+ for _, v := range values {
+ for _, w := range values {
+ got := test.f(v, w)
+ want := test.golden(v, w)
+ if want != got {
+ t.Errorf("[%s](%d,%d)=%d, want %d", test.name, v, w, got, want)
+ }
+ }
+ }
+ }
+}
+
+func TestLogic8(t *testing.T) {
+ // test values to determine function equality
+ values := [...]int8{-1 << 7, 1<<7 - 1, -4, -3, -2, -1, 0, 1, 2, 3, 4}
+
+ // golden functions we use repeatedly
+ zero := func(x int8) int8 { return 0 }
+ id := func(x int8) int8 { return x }
+ or := func(x, y int8) int8 { return x | y }
+ and := func(x, y int8) int8 { return x & y }
+ y := func(x, y int8) int8 { return y }
+
+ for _, test := range [...]struct {
+ name string
+ f func(int8) int8
+ golden func(int8) int8
+ }{
+ {"x|x", func(x int8) int8 { return x | x }, id},
+ {"x|0", func(x int8) int8 { return x | 0 }, id},
+ {"x|-1", func(x int8) int8 { return x | -1 }, func(x int8) int8 { return -1 }},
+ {"x&x", func(x int8) int8 { return x & x }, id},
+ {"x&0", func(x int8) int8 { return x & 0 }, zero},
+ {"x&-1", func(x int8) int8 { return x & -1 }, id},
+ {"x^x", func(x int8) int8 { return x ^ x }, zero},
+ {"x^0", func(x int8) int8 { return x ^ 0 }, id},
+ {"x^-1", func(x int8) int8 { return x ^ -1 }, func(x int8) int8 { return ^x }},
+ {"x+0", func(x int8) int8 { return x + 0 }, id},
+ {"x-x", func(x int8) int8 { return x - x }, zero},
+ {"x*0", func(x int8) int8 { return x * 0 }, zero},
+ {"^^x", func(x int8) int8 { return ^^x }, id},
+ } {
+ for _, v := range values {
+ got := test.f(v)
+ want := test.golden(v)
+ if want != got {
+ t.Errorf("[%s](%d)=%d, want %d", test.name, v, got, want)
+ }
+ }
+ }
+ for _, test := range [...]struct {
+ name string
+ f func(int8, int8) int8
+ golden func(int8, int8) int8
+ }{
+ {"x|(x|y)", func(x, y int8) int8 { return x | (x | y) }, or},
+ {"x|(y|x)", func(x, y int8) int8 { return x | (y | x) }, or},
+ {"(x|y)|x", func(x, y int8) int8 { return (x | y) | x }, or},
+ {"(y|x)|x", func(x, y int8) int8 { return (y | x) | x }, or},
+ {"x&(x&y)", func(x, y int8) int8 { return x & (x & y) }, and},
+ {"x&(y&x)", func(x, y int8) int8 { return x & (y & x) }, and},
+ {"(x&y)&x", func(x, y int8) int8 { return (x & y) & x }, and},
+ {"(y&x)&x", func(x, y int8) int8 { return (y & x) & x }, and},
+ {"x^(x^y)", func(x, y int8) int8 { return x ^ (x ^ y) }, y},
+ {"x^(y^x)", func(x, y int8) int8 { return x ^ (y ^ x) }, y},
+ {"(x^y)^x", func(x, y int8) int8 { return (x ^ y) ^ x }, y},
+ {"(y^x)^x", func(x, y int8) int8 { return (y ^ x) ^ x }, y},
+ {"-(y-x)", func(x, y int8) int8 { return -(y - x) }, func(x, y int8) int8 { return x - y }},
+ {"(x+y)-x", func(x, y int8) int8 { return (x + y) - x }, y},
+ {"(y+x)-x", func(x, y int8) int8 { return (y + x) - x }, y},
+ } {
+ for _, v := range values {
+ for _, w := range values {
+ got := test.f(v, w)
+ want := test.golden(v, w)
+ if want != got {
+ t.Errorf("[%s](%d,%d)=%d, want %d", test.name, v, w, got, want)
+ }
+ }
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/math_test.go b/src/cmd/compile/internal/test/math_test.go
new file mode 100644
index 0000000..6bcb460
--- /dev/null
+++ b/src/cmd/compile/internal/test/math_test.go
@@ -0,0 +1,167 @@
+package test
+
+import (
+ "testing"
+)
+
+var Output int
+
+func BenchmarkDiv64UnsignedSmall(b *testing.B) {
+ q := uint64(1)
+ for i := 1; i <= b.N; i++ {
+ q = (q + uint64(i)) / uint64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64Small(b *testing.B) {
+ q := int64(1)
+ for i := 1; i <= b.N; i++ {
+ q = (q + int64(i)) / int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64SmallNegDivisor(b *testing.B) {
+ q := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ q = (int64(i) - q) / -int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64SmallNegDividend(b *testing.B) {
+ q := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ q = -(int64(i) - q) / int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64SmallNegBoth(b *testing.B) {
+ q := int64(1)
+ for i := 1; i <= b.N; i++ {
+ q = -(int64(i) + q) / -int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64Unsigned(b *testing.B) {
+ q := uint64(1)
+ for i := 1; i <= b.N; i++ {
+ q = (uint64(0x7fffffffffffffff) - uint64(i) - (q & 1)) / uint64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64(b *testing.B) {
+ q := int64(1)
+ for i := 1; i <= b.N; i++ {
+ q = (int64(0x7fffffffffffffff) - int64(i) - (q & 1)) / int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64NegDivisor(b *testing.B) {
+ q := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ q = (int64(0x7fffffffffffffff) - int64(i) - (q & 1)) / -int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64NegDividend(b *testing.B) {
+ q := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ q = -(int64(0x7fffffffffffffff) - int64(i) - (q & 1)) / int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkDiv64NegBoth(b *testing.B) {
+ q := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ q = -(int64(0x7fffffffffffffff) - int64(i) - (q & 1)) / -int64(i)
+ }
+ Output = int(q)
+}
+
+func BenchmarkMod64UnsignedSmall(b *testing.B) {
+ r := uint64(1)
+ for i := 1; i <= b.N; i++ {
+ r = (uint64(i) + r) % uint64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64Small(b *testing.B) {
+ r := int64(1)
+ for i := 1; i <= b.N; i++ {
+ r = (int64(i) + r) % int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64SmallNegDivisor(b *testing.B) {
+ r := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ r = (int64(i) - r) % -int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64SmallNegDividend(b *testing.B) {
+ r := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ r = -(int64(i) - r) % int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64SmallNegBoth(b *testing.B) {
+ r := int64(1)
+ for i := 1; i <= b.N; i++ {
+ r = -(int64(i) + r) % -int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64Unsigned(b *testing.B) {
+ r := uint64(1)
+ for i := 1; i <= b.N; i++ {
+ r = (uint64(0x7fffffffffffffff) - uint64(i) - (r & 1)) % uint64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64(b *testing.B) {
+ r := int64(1)
+ for i := 1; i <= b.N; i++ {
+ r = (int64(0x7fffffffffffffff) - int64(i) - (r & 1)) % int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64NegDivisor(b *testing.B) {
+ r := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ r = (int64(0x7fffffffffffffff) - int64(i) - (r & 1)) % -int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64NegDividend(b *testing.B) {
+ r := int64(-1)
+ for i := 1; i <= b.N; i++ {
+ r = -(int64(0x7fffffffffffffff) - int64(i) - (r & 1)) % int64(i)
+ }
+ Output = int(r)
+}
+
+func BenchmarkMod64NegBoth(b *testing.B) {
+ r := int64(1)
+ for i := 1; i <= b.N; i++ {
+ r = -(int64(0x7fffffffffffffff) - int64(i) - (r & 1)) % -int64(i)
+ }
+ Output = int(r)
+}
diff --git a/src/cmd/compile/internal/test/memcombine_test.go b/src/cmd/compile/internal/test/memcombine_test.go
new file mode 100644
index 0000000..3fc4a00
--- /dev/null
+++ b/src/cmd/compile/internal/test/memcombine_test.go
@@ -0,0 +1,199 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "encoding/binary"
+ "testing"
+)
+
+var gv = [16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8}
+
+//go:noinline
+func readGlobalUnaligned() uint64 {
+ return binary.LittleEndian.Uint64(gv[1:])
+}
+
+func TestUnalignedGlobal(t *testing.T) {
+ // Note: this is a test not so much of the result of the read, but of
+ // the correct compilation of that read. On s390x unaligned global
+ // accesses fail to compile.
+ if got, want := readGlobalUnaligned(), uint64(0x0807060504030201); got != want {
+ t.Errorf("read global %x, want %x", got, want)
+ }
+}
+
+func TestSpillOfExtendedEndianLoads(t *testing.T) {
+ b := []byte{0xaa, 0xbb, 0xcc, 0xdd}
+
+ var testCases = []struct {
+ fn func([]byte) uint64
+ want uint64
+ }{
+ {readUint16le, 0xbbaa},
+ {readUint16be, 0xaabb},
+ {readUint32le, 0xddccbbaa},
+ {readUint32be, 0xaabbccdd},
+ }
+ for _, test := range testCases {
+ if got := test.fn(b); got != test.want {
+ t.Errorf("got %x, want %x", got, test.want)
+ }
+ }
+}
+
+func readUint16le(b []byte) uint64 {
+ y := uint64(binary.LittleEndian.Uint16(b))
+ nop() // force spill
+ return y
+}
+
+func readUint16be(b []byte) uint64 {
+ y := uint64(binary.BigEndian.Uint16(b))
+ nop() // force spill
+ return y
+}
+
+func readUint32le(b []byte) uint64 {
+ y := uint64(binary.LittleEndian.Uint32(b))
+ nop() // force spill
+ return y
+}
+
+func readUint32be(b []byte) uint64 {
+ y := uint64(binary.BigEndian.Uint32(b))
+ nop() // force spill
+ return y
+}
+
+//go:noinline
+func nop() {
+}
+
+type T32 struct {
+ a, b uint32
+}
+
+//go:noinline
+func (t *T32) bigEndianLoad() uint64 {
+ return uint64(t.a)<<32 | uint64(t.b)
+}
+
+//go:noinline
+func (t *T32) littleEndianLoad() uint64 {
+ return uint64(t.a) | (uint64(t.b) << 32)
+}
+
+//go:noinline
+func (t *T32) bigEndianStore(x uint64) {
+ t.a = uint32(x >> 32)
+ t.b = uint32(x)
+}
+
+//go:noinline
+func (t *T32) littleEndianStore(x uint64) {
+ t.a = uint32(x)
+ t.b = uint32(x >> 32)
+}
+
+type T16 struct {
+ a, b uint16
+}
+
+//go:noinline
+func (t *T16) bigEndianLoad() uint32 {
+ return uint32(t.a)<<16 | uint32(t.b)
+}
+
+//go:noinline
+func (t *T16) littleEndianLoad() uint32 {
+ return uint32(t.a) | (uint32(t.b) << 16)
+}
+
+//go:noinline
+func (t *T16) bigEndianStore(x uint32) {
+ t.a = uint16(x >> 16)
+ t.b = uint16(x)
+}
+
+//go:noinline
+func (t *T16) littleEndianStore(x uint32) {
+ t.a = uint16(x)
+ t.b = uint16(x >> 16)
+}
+
+type T8 struct {
+ a, b uint8
+}
+
+//go:noinline
+func (t *T8) bigEndianLoad() uint16 {
+ return uint16(t.a)<<8 | uint16(t.b)
+}
+
+//go:noinline
+func (t *T8) littleEndianLoad() uint16 {
+ return uint16(t.a) | (uint16(t.b) << 8)
+}
+
+//go:noinline
+func (t *T8) bigEndianStore(x uint16) {
+ t.a = uint8(x >> 8)
+ t.b = uint8(x)
+}
+
+//go:noinline
+func (t *T8) littleEndianStore(x uint16) {
+ t.a = uint8(x)
+ t.b = uint8(x >> 8)
+}
+
+func TestIssue64468(t *testing.T) {
+ t32 := T32{1, 2}
+ if got, want := t32.bigEndianLoad(), uint64(1<<32+2); got != want {
+ t.Errorf("T32.bigEndianLoad got %x want %x\n", got, want)
+ }
+ if got, want := t32.littleEndianLoad(), uint64(1+2<<32); got != want {
+ t.Errorf("T32.littleEndianLoad got %x want %x\n", got, want)
+ }
+ t16 := T16{1, 2}
+ if got, want := t16.bigEndianLoad(), uint32(1<<16+2); got != want {
+ t.Errorf("T16.bigEndianLoad got %x want %x\n", got, want)
+ }
+ if got, want := t16.littleEndianLoad(), uint32(1+2<<16); got != want {
+ t.Errorf("T16.littleEndianLoad got %x want %x\n", got, want)
+ }
+ t8 := T8{1, 2}
+ if got, want := t8.bigEndianLoad(), uint16(1<<8+2); got != want {
+ t.Errorf("T8.bigEndianLoad got %x want %x\n", got, want)
+ }
+ if got, want := t8.littleEndianLoad(), uint16(1+2<<8); got != want {
+ t.Errorf("T8.littleEndianLoad got %x want %x\n", got, want)
+ }
+ t32.bigEndianStore(1<<32 + 2)
+ if got, want := t32, (T32{1, 2}); got != want {
+ t.Errorf("T32.bigEndianStore got %x want %x\n", got, want)
+ }
+ t32.littleEndianStore(1<<32 + 2)
+ if got, want := t32, (T32{2, 1}); got != want {
+ t.Errorf("T32.littleEndianStore got %x want %x\n", got, want)
+ }
+ t16.bigEndianStore(1<<16 + 2)
+ if got, want := t16, (T16{1, 2}); got != want {
+ t.Errorf("T16.bigEndianStore got %x want %x\n", got, want)
+ }
+ t16.littleEndianStore(1<<16 + 2)
+ if got, want := t16, (T16{2, 1}); got != want {
+ t.Errorf("T16.littleEndianStore got %x want %x\n", got, want)
+ }
+ t8.bigEndianStore(1<<8 + 2)
+ if got, want := t8, (T8{1, 2}); got != want {
+ t.Errorf("T8.bigEndianStore got %x want %x\n", got, want)
+ }
+ t8.littleEndianStore(1<<8 + 2)
+ if got, want := t8, (T8{2, 1}); got != want {
+ t.Errorf("T8.littleEndianStore got %x want %x\n", got, want)
+ }
+}
diff --git a/src/cmd/compile/internal/test/mulconst_test.go b/src/cmd/compile/internal/test/mulconst_test.go
new file mode 100644
index 0000000..314cab3
--- /dev/null
+++ b/src/cmd/compile/internal/test/mulconst_test.go
@@ -0,0 +1,242 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import "testing"
+
+// Benchmark multiplication of an integer by various constants.
+//
+// The comment above each sub-benchmark provides an example of how the
+// target multiplication operation might be implemented using shift
+// (multiplication by a power of 2), addition and subtraction
+// operations. It is platform-dependent whether these transformations
+// are actually applied.
+
+var (
+ mulSinkI32 int32
+ mulSinkI64 int64
+ mulSinkU32 uint32
+ mulSinkU64 uint64
+)
+
+func BenchmarkMulconstI32(b *testing.B) {
+ // 3x = 2x + x
+ b.Run("3", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 3
+ }
+ mulSinkI32 = x
+ })
+ // 5x = 4x + x
+ b.Run("5", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 5
+ }
+ mulSinkI32 = x
+ })
+ // 12x = 8x + 4x
+ b.Run("12", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 12
+ }
+ mulSinkI32 = x
+ })
+ // 120x = 128x - 8x
+ b.Run("120", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 120
+ }
+ mulSinkI32 = x
+ })
+ // -120x = 8x - 120x
+ b.Run("-120", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= -120
+ }
+ mulSinkI32 = x
+ })
+ // 65537x = 65536x + x
+ b.Run("65537", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65537
+ }
+ mulSinkI32 = x
+ })
+ // 65538x = 65536x + 2x
+ b.Run("65538", func(b *testing.B) {
+ x := int32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65538
+ }
+ mulSinkI32 = x
+ })
+}
+
+func BenchmarkMulconstI64(b *testing.B) {
+ // 3x = 2x + x
+ b.Run("3", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 3
+ }
+ mulSinkI64 = x
+ })
+ // 5x = 4x + x
+ b.Run("5", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 5
+ }
+ mulSinkI64 = x
+ })
+ // 12x = 8x + 4x
+ b.Run("12", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 12
+ }
+ mulSinkI64 = x
+ })
+ // 120x = 128x - 8x
+ b.Run("120", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 120
+ }
+ mulSinkI64 = x
+ })
+ // -120x = 8x - 120x
+ b.Run("-120", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= -120
+ }
+ mulSinkI64 = x
+ })
+ // 65537x = 65536x + x
+ b.Run("65537", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65537
+ }
+ mulSinkI64 = x
+ })
+ // 65538x = 65536x + 2x
+ b.Run("65538", func(b *testing.B) {
+ x := int64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65538
+ }
+ mulSinkI64 = x
+ })
+}
+
+func BenchmarkMulconstU32(b *testing.B) {
+ // 3x = 2x + x
+ b.Run("3", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 3
+ }
+ mulSinkU32 = x
+ })
+ // 5x = 4x + x
+ b.Run("5", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 5
+ }
+ mulSinkU32 = x
+ })
+ // 12x = 8x + 4x
+ b.Run("12", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 12
+ }
+ mulSinkU32 = x
+ })
+ // 120x = 128x - 8x
+ b.Run("120", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 120
+ }
+ mulSinkU32 = x
+ })
+ // 65537x = 65536x + x
+ b.Run("65537", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65537
+ }
+ mulSinkU32 = x
+ })
+ // 65538x = 65536x + 2x
+ b.Run("65538", func(b *testing.B) {
+ x := uint32(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65538
+ }
+ mulSinkU32 = x
+ })
+}
+
+func BenchmarkMulconstU64(b *testing.B) {
+ // 3x = 2x + x
+ b.Run("3", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 3
+ }
+ mulSinkU64 = x
+ })
+ // 5x = 4x + x
+ b.Run("5", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 5
+ }
+ mulSinkU64 = x
+ })
+ // 12x = 8x + 4x
+ b.Run("12", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 12
+ }
+ mulSinkU64 = x
+ })
+ // 120x = 128x - 8x
+ b.Run("120", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 120
+ }
+ mulSinkU64 = x
+ })
+ // 65537x = 65536x + x
+ b.Run("65537", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65537
+ }
+ mulSinkU64 = x
+ })
+ // 65538x = 65536x + 2x
+ b.Run("65538", func(b *testing.B) {
+ x := uint64(1)
+ for i := 0; i < b.N; i++ {
+ x *= 65538
+ }
+ mulSinkU64 = x
+ })
+}
diff --git a/src/cmd/compile/internal/test/pgo_devirtualize_test.go b/src/cmd/compile/internal/test/pgo_devirtualize_test.go
new file mode 100644
index 0000000..49e95e9
--- /dev/null
+++ b/src/cmd/compile/internal/test/pgo_devirtualize_test.go
@@ -0,0 +1,128 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bufio"
+ "fmt"
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "regexp"
+ "testing"
+)
+
+// testPGODevirtualize tests that specific PGO devirtualize rewrites are performed.
+func testPGODevirtualize(t *testing.T, dir string) {
+ testenv.MustHaveGoRun(t)
+ t.Parallel()
+
+ const pkg = "example.com/pgo/devirtualize"
+
+ // Add a go.mod so we have a consistent symbol names in this temp dir.
+ goMod := fmt.Sprintf(`module %s
+go 1.19
+`, pkg)
+ if err := os.WriteFile(filepath.Join(dir, "go.mod"), []byte(goMod), 0644); err != nil {
+ t.Fatalf("error writing go.mod: %v", err)
+ }
+
+ // Build the test with the profile.
+ pprof := filepath.Join(dir, "devirt.pprof")
+ gcflag := fmt.Sprintf("-gcflags=-m=2 -pgoprofile=%s -d=pgodebug=2", pprof)
+ out := filepath.Join(dir, "test.exe")
+ cmd := testenv.CleanCmdEnv(testenv.Command(t, testenv.GoToolPath(t), "build", "-o", out, gcflag, "."))
+ cmd.Dir = dir
+
+ pr, pw, err := os.Pipe()
+ if err != nil {
+ t.Fatalf("error creating pipe: %v", err)
+ }
+ defer pr.Close()
+ cmd.Stdout = pw
+ cmd.Stderr = pw
+
+ err = cmd.Start()
+ pw.Close()
+ if err != nil {
+ t.Fatalf("error starting go test: %v", err)
+ }
+
+ type devirtualization struct {
+ pos string
+ callee string
+ }
+
+ want := []devirtualization{
+ {
+ pos: "./devirt.go:61:21",
+ callee: "mult.Mult.Multiply",
+ },
+ {
+ pos: "./devirt.go:61:31",
+ callee: "Add.Add",
+ },
+ }
+
+ got := make(map[devirtualization]struct{})
+
+ devirtualizedLine := regexp.MustCompile(`(.*): PGO devirtualizing .* to (.*)`)
+
+ scanner := bufio.NewScanner(pr)
+ for scanner.Scan() {
+ line := scanner.Text()
+ t.Logf("child: %s", line)
+
+ m := devirtualizedLine.FindStringSubmatch(line)
+ if m == nil {
+ continue
+ }
+
+ d := devirtualization{
+ pos: m[1],
+ callee: m[2],
+ }
+ got[d] = struct{}{}
+ }
+ if err := cmd.Wait(); err != nil {
+ t.Fatalf("error running go test: %v", err)
+ }
+ if err := scanner.Err(); err != nil {
+ t.Fatalf("error reading go test output: %v", err)
+ }
+
+ if len(got) != len(want) {
+ t.Errorf("mismatched devirtualization count; got %v want %v", got, want)
+ }
+ for _, w := range want {
+ if _, ok := got[w]; ok {
+ continue
+ }
+ t.Errorf("devirtualization %v missing; got %v", w, got)
+ }
+}
+
+// TestPGODevirtualize tests that specific functions are devirtualized when PGO
+// is applied to the exact source that was profiled.
+func TestPGODevirtualize(t *testing.T) {
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Fatalf("error getting wd: %v", err)
+ }
+ srcDir := filepath.Join(wd, "testdata", "pgo", "devirtualize")
+
+ // Copy the module to a scratch location so we can add a go.mod.
+ dir := t.TempDir()
+ if err := os.Mkdir(filepath.Join(dir, "mult"), 0755); err != nil {
+ t.Fatalf("error creating dir: %v", err)
+ }
+ for _, file := range []string{"devirt.go", "devirt_test.go", "devirt.pprof", filepath.Join("mult", "mult.go")} {
+ if err := copyFile(filepath.Join(dir, file), filepath.Join(srcDir, file)); err != nil {
+ t.Fatalf("error copying %s: %v", file, err)
+ }
+ }
+
+ testPGODevirtualize(t, dir)
+}
diff --git a/src/cmd/compile/internal/test/pgo_inl_test.go b/src/cmd/compile/internal/test/pgo_inl_test.go
new file mode 100644
index 0000000..4d6b5a1
--- /dev/null
+++ b/src/cmd/compile/internal/test/pgo_inl_test.go
@@ -0,0 +1,299 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bufio"
+ "fmt"
+ "internal/profile"
+ "internal/testenv"
+ "io"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strings"
+ "testing"
+)
+
+// testPGOIntendedInlining tests that specific functions are inlined.
+func testPGOIntendedInlining(t *testing.T, dir string) {
+ testenv.MustHaveGoRun(t)
+ t.Parallel()
+
+ const pkg = "example.com/pgo/inline"
+
+ // Add a go.mod so we have a consistent symbol names in this temp dir.
+ goMod := fmt.Sprintf(`module %s
+go 1.19
+`, pkg)
+ if err := os.WriteFile(filepath.Join(dir, "go.mod"), []byte(goMod), 0644); err != nil {
+ t.Fatalf("error writing go.mod: %v", err)
+ }
+
+ want := []string{
+ "(*BS).NS",
+ }
+
+ // The functions which are not expected to be inlined are as follows.
+ wantNot := []string{
+ // The calling edge main->A is hot and the cost of A is large
+ // than inlineHotCalleeMaxBudget.
+ "A",
+ // The calling edge BenchmarkA" -> benchmarkB is cold and the
+ // cost of A is large than inlineMaxBudget.
+ "benchmarkB",
+ }
+
+ must := map[string]bool{
+ "(*BS).NS": true,
+ }
+
+ notInlinedReason := make(map[string]string)
+ for _, fname := range want {
+ fullName := pkg + "." + fname
+ if _, ok := notInlinedReason[fullName]; ok {
+ t.Errorf("duplicate func: %s", fullName)
+ }
+ notInlinedReason[fullName] = "unknown reason"
+ }
+
+ // If the compiler emit "cannot inline for function A", the entry A
+ // in expectedNotInlinedList will be removed.
+ expectedNotInlinedList := make(map[string]struct{})
+ for _, fname := range wantNot {
+ fullName := pkg + "." + fname
+ expectedNotInlinedList[fullName] = struct{}{}
+ }
+
+ // Build the test with the profile. Use a smaller threshold to test.
+ // TODO: maybe adjust the test to work with default threshold.
+ pprof := filepath.Join(dir, "inline_hot.pprof")
+ gcflag := fmt.Sprintf("-gcflags=-m -m -pgoprofile=%s -d=pgoinlinebudget=160,pgoinlinecdfthreshold=90", pprof)
+ out := filepath.Join(dir, "test.exe")
+ cmd := testenv.CleanCmdEnv(testenv.Command(t, testenv.GoToolPath(t), "test", "-c", "-o", out, gcflag, "."))
+ cmd.Dir = dir
+
+ pr, pw, err := os.Pipe()
+ if err != nil {
+ t.Fatalf("error creating pipe: %v", err)
+ }
+ defer pr.Close()
+ cmd.Stdout = pw
+ cmd.Stderr = pw
+
+ err = cmd.Start()
+ pw.Close()
+ if err != nil {
+ t.Fatalf("error starting go test: %v", err)
+ }
+
+ scanner := bufio.NewScanner(pr)
+ curPkg := ""
+ canInline := regexp.MustCompile(`: can inline ([^ ]*)`)
+ haveInlined := regexp.MustCompile(`: inlining call to ([^ ]*)`)
+ cannotInline := regexp.MustCompile(`: cannot inline ([^ ]*): (.*)`)
+ for scanner.Scan() {
+ line := scanner.Text()
+ t.Logf("child: %s", line)
+ if strings.HasPrefix(line, "# ") {
+ curPkg = line[2:]
+ splits := strings.Split(curPkg, " ")
+ curPkg = splits[0]
+ continue
+ }
+ if m := haveInlined.FindStringSubmatch(line); m != nil {
+ fname := m[1]
+ delete(notInlinedReason, curPkg+"."+fname)
+ continue
+ }
+ if m := canInline.FindStringSubmatch(line); m != nil {
+ fname := m[1]
+ fullname := curPkg + "." + fname
+ // If function must be inlined somewhere, being inlinable is not enough
+ if _, ok := must[fullname]; !ok {
+ delete(notInlinedReason, fullname)
+ continue
+ }
+ }
+ if m := cannotInline.FindStringSubmatch(line); m != nil {
+ fname, reason := m[1], m[2]
+ fullName := curPkg + "." + fname
+ if _, ok := notInlinedReason[fullName]; ok {
+ // cmd/compile gave us a reason why
+ notInlinedReason[fullName] = reason
+ }
+ delete(expectedNotInlinedList, fullName)
+ continue
+ }
+ }
+ if err := cmd.Wait(); err != nil {
+ t.Fatalf("error running go test: %v", err)
+ }
+ if err := scanner.Err(); err != nil {
+ t.Fatalf("error reading go test output: %v", err)
+ }
+ for fullName, reason := range notInlinedReason {
+ t.Errorf("%s was not inlined: %s", fullName, reason)
+ }
+
+ // If the list expectedNotInlinedList is not empty, it indicates
+ // the functions in the expectedNotInlinedList are marked with caninline.
+ for fullName, _ := range expectedNotInlinedList {
+ t.Errorf("%s was expected not inlined", fullName)
+ }
+}
+
+// TestPGOIntendedInlining tests that specific functions are inlined when PGO
+// is applied to the exact source that was profiled.
+func TestPGOIntendedInlining(t *testing.T) {
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Fatalf("error getting wd: %v", err)
+ }
+ srcDir := filepath.Join(wd, "testdata/pgo/inline")
+
+ // Copy the module to a scratch location so we can add a go.mod.
+ dir := t.TempDir()
+
+ for _, file := range []string{"inline_hot.go", "inline_hot_test.go", "inline_hot.pprof"} {
+ if err := copyFile(filepath.Join(dir, file), filepath.Join(srcDir, file)); err != nil {
+ t.Fatalf("error copying %s: %v", file, err)
+ }
+ }
+
+ testPGOIntendedInlining(t, dir)
+}
+
+// TestPGOIntendedInlining tests that specific functions are inlined when PGO
+// is applied to the modified source.
+func TestPGOIntendedInliningShiftedLines(t *testing.T) {
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Fatalf("error getting wd: %v", err)
+ }
+ srcDir := filepath.Join(wd, "testdata/pgo/inline")
+
+ // Copy the module to a scratch location so we can modify the source.
+ dir := t.TempDir()
+
+ // Copy most of the files unmodified.
+ for _, file := range []string{"inline_hot_test.go", "inline_hot.pprof"} {
+ if err := copyFile(filepath.Join(dir, file), filepath.Join(srcDir, file)); err != nil {
+ t.Fatalf("error copying %s : %v", file, err)
+ }
+ }
+
+ // Add some comments to the top of inline_hot.go. This adjusts the line
+ // numbers of all of the functions without changing the semantics.
+ src, err := os.Open(filepath.Join(srcDir, "inline_hot.go"))
+ if err != nil {
+ t.Fatalf("error opening src inline_hot.go: %v", err)
+ }
+ defer src.Close()
+
+ dst, err := os.Create(filepath.Join(dir, "inline_hot.go"))
+ if err != nil {
+ t.Fatalf("error creating dst inline_hot.go: %v", err)
+ }
+ defer dst.Close()
+
+ if _, err := io.WriteString(dst, `// Autogenerated
+// Lines
+`); err != nil {
+ t.Fatalf("error writing comments to dst: %v", err)
+ }
+
+ if _, err := io.Copy(dst, src); err != nil {
+ t.Fatalf("error copying inline_hot.go: %v", err)
+ }
+
+ dst.Close()
+
+ testPGOIntendedInlining(t, dir)
+}
+
+// TestPGOSingleIndex tests that the sample index can not be 1 and compilation
+// will not fail. All it should care about is that the sample type is either
+// CPU nanoseconds or samples count, whichever it finds first.
+func TestPGOSingleIndex(t *testing.T) {
+ for _, tc := range []struct {
+ originalIndex int
+ }{{
+ // The `testdata/pgo/inline/inline_hot.pprof` file is a standard CPU
+ // profile as the runtime would generate. The 0 index contains the
+ // value-type samples and value-unit count. The 1 index contains the
+ // value-type cpu and value-unit nanoseconds. These tests ensure that
+ // the compiler can work with profiles that only have a single index,
+ // but are either samples count or CPU nanoseconds.
+ originalIndex: 0,
+ }, {
+ originalIndex: 1,
+ }} {
+ t.Run(fmt.Sprintf("originalIndex=%d", tc.originalIndex), func(t *testing.T) {
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Fatalf("error getting wd: %v", err)
+ }
+ srcDir := filepath.Join(wd, "testdata/pgo/inline")
+
+ // Copy the module to a scratch location so we can add a go.mod.
+ dir := t.TempDir()
+
+ originalPprofFile, err := os.Open(filepath.Join(srcDir, "inline_hot.pprof"))
+ if err != nil {
+ t.Fatalf("error opening inline_hot.pprof: %v", err)
+ }
+ defer originalPprofFile.Close()
+
+ p, err := profile.Parse(originalPprofFile)
+ if err != nil {
+ t.Fatalf("error parsing inline_hot.pprof: %v", err)
+ }
+
+ // Move the samples count value-type to the 0 index.
+ p.SampleType = []*profile.ValueType{p.SampleType[tc.originalIndex]}
+
+ // Ensure we only have a single set of sample values.
+ for _, s := range p.Sample {
+ s.Value = []int64{s.Value[tc.originalIndex]}
+ }
+
+ modifiedPprofFile, err := os.Create(filepath.Join(dir, "inline_hot.pprof"))
+ if err != nil {
+ t.Fatalf("error creating inline_hot.pprof: %v", err)
+ }
+ defer modifiedPprofFile.Close()
+
+ if err := p.Write(modifiedPprofFile); err != nil {
+ t.Fatalf("error writing inline_hot.pprof: %v", err)
+ }
+
+ for _, file := range []string{"inline_hot.go", "inline_hot_test.go"} {
+ if err := copyFile(filepath.Join(dir, file), filepath.Join(srcDir, file)); err != nil {
+ t.Fatalf("error copying %s: %v", file, err)
+ }
+ }
+
+ testPGOIntendedInlining(t, dir)
+ })
+ }
+}
+
+func copyFile(dst, src string) error {
+ s, err := os.Open(src)
+ if err != nil {
+ return err
+ }
+ defer s.Close()
+
+ d, err := os.Create(dst)
+ if err != nil {
+ return err
+ }
+ defer d.Close()
+
+ _, err = io.Copy(d, s)
+ return err
+}
diff --git a/src/cmd/compile/internal/test/race.go b/src/cmd/compile/internal/test/race.go
new file mode 100644
index 0000000..b721538
--- /dev/null
+++ b/src/cmd/compile/internal/test/race.go
@@ -0,0 +1,64 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !compiler_bootstrap
+
+package test
+
+// The racecompile builder only builds packages, but does not build
+// or run tests. This is a non-test file to hold cases that (used
+// to) trigger compiler data races, so they will be exercised on
+// the racecompile builder.
+//
+// This package is not imported so functions here are not included
+// in the actual compiler.
+
+// Issue 55357: data race when building multiple instantiations of
+// generic closures with _ parameters.
+func Issue55357() {
+ type U struct {
+ A int
+ B string
+ C string
+ }
+ var q T55357[U]
+ q.Count()
+ q.List()
+
+ type M struct {
+ A int64
+ B uint32
+ C uint32
+ }
+ var q2 T55357[M]
+ q2.Count()
+ q2.List()
+}
+
+type T55357[T any] struct{}
+
+//go:noinline
+func (q *T55357[T]) do(w, v bool, fn func(bk []byte, v T) error) error {
+ return nil
+}
+
+func (q *T55357[T]) Count() (n int, rerr error) {
+ err := q.do(false, false, func(kb []byte, _ T) error {
+ n++
+ return nil
+ })
+ return n, err
+}
+
+func (q *T55357[T]) List() (list []T, rerr error) {
+ var l []T
+ err := q.do(false, true, func(_ []byte, v T) error {
+ l = append(l, v)
+ return nil
+ })
+ if err != nil {
+ return nil, err
+ }
+ return l, nil
+}
diff --git a/src/cmd/compile/internal/test/reproduciblebuilds_test.go b/src/cmd/compile/internal/test/reproduciblebuilds_test.go
new file mode 100644
index 0000000..466e0c3
--- /dev/null
+++ b/src/cmd/compile/internal/test/reproduciblebuilds_test.go
@@ -0,0 +1,106 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bytes"
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+func TestReproducibleBuilds(t *testing.T) {
+ tests := []string{
+ "issue20272.go",
+ "issue27013.go",
+ "issue30202.go",
+ }
+
+ testenv.MustHaveGoBuild(t)
+ iters := 10
+ if testing.Short() {
+ iters = 4
+ }
+ t.Parallel()
+ for _, test := range tests {
+ test := test
+ t.Run(test, func(t *testing.T) {
+ t.Parallel()
+ var want []byte
+ tmp, err := os.CreateTemp("", "")
+ if err != nil {
+ t.Fatalf("temp file creation failed: %v", err)
+ }
+ defer os.Remove(tmp.Name())
+ defer tmp.Close()
+ for i := 0; i < iters; i++ {
+ // Note: use -c 2 to expose any nondeterminism which is the result
+ // of the runtime scheduler.
+ out, err := testenv.Command(t, testenv.GoToolPath(t), "tool", "compile", "-p=p", "-c", "2", "-o", tmp.Name(), filepath.Join("testdata", "reproducible", test)).CombinedOutput()
+ if err != nil {
+ t.Fatalf("failed to compile: %v\n%s", err, out)
+ }
+ obj, err := os.ReadFile(tmp.Name())
+ if err != nil {
+ t.Fatalf("failed to read object file: %v", err)
+ }
+ if i == 0 {
+ want = obj
+ } else {
+ if !bytes.Equal(want, obj) {
+ t.Fatalf("builds produced different output after %d iters (%d bytes vs %d bytes)", i, len(want), len(obj))
+ }
+ }
+ }
+ })
+ }
+}
+
+func TestIssue38068(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ t.Parallel()
+
+ // Compile a small package with and without the concurrent
+ // backend, then check to make sure that the resulting archives
+ // are identical. Note: this uses "go tool compile" instead of
+ // "go build" since the latter will generate different build IDs
+ // if it sees different command line flags.
+ scenarios := []struct {
+ tag string
+ args string
+ libpath string
+ }{
+ {tag: "serial", args: "-c=1"},
+ {tag: "concurrent", args: "-c=2"}}
+
+ tmpdir := t.TempDir()
+
+ src := filepath.Join("testdata", "reproducible", "issue38068.go")
+ for i := range scenarios {
+ s := &scenarios[i]
+ s.libpath = filepath.Join(tmpdir, s.tag+".a")
+ // Note: use of "-p" required in order for DWARF to be generated.
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "compile", "-p=issue38068", "-buildid=", s.args, "-o", s.libpath, src)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("%v: %v:\n%s", cmd.Args, err, out)
+ }
+ }
+
+ readBytes := func(fn string) []byte {
+ payload, err := os.ReadFile(fn)
+ if err != nil {
+ t.Fatalf("failed to read executable '%s': %v", fn, err)
+ }
+ return payload
+ }
+
+ b1 := readBytes(scenarios[0].libpath)
+ b2 := readBytes(scenarios[1].libpath)
+ if !bytes.Equal(b1, b2) {
+ t.Fatalf("concurrent and serial builds produced different output")
+ }
+}
diff --git a/src/cmd/compile/internal/test/shift_test.go b/src/cmd/compile/internal/test/shift_test.go
new file mode 100644
index 0000000..dd893a1
--- /dev/null
+++ b/src/cmd/compile/internal/test/shift_test.go
@@ -0,0 +1,1152 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "reflect"
+ "testing"
+)
+
+// Tests shifts of zero.
+
+//go:noinline
+func ofz64l64(n uint64) int64 {
+ var x int64
+ return x << n
+}
+
+//go:noinline
+func ofz64l32(n uint32) int64 {
+ var x int64
+ return x << n
+}
+
+//go:noinline
+func ofz64l16(n uint16) int64 {
+ var x int64
+ return x << n
+}
+
+//go:noinline
+func ofz64l8(n uint8) int64 {
+ var x int64
+ return x << n
+}
+
+//go:noinline
+func ofz64r64(n uint64) int64 {
+ var x int64
+ return x >> n
+}
+
+//go:noinline
+func ofz64r32(n uint32) int64 {
+ var x int64
+ return x >> n
+}
+
+//go:noinline
+func ofz64r16(n uint16) int64 {
+ var x int64
+ return x >> n
+}
+
+//go:noinline
+func ofz64r8(n uint8) int64 {
+ var x int64
+ return x >> n
+}
+
+//go:noinline
+func ofz64ur64(n uint64) uint64 {
+ var x uint64
+ return x >> n
+}
+
+//go:noinline
+func ofz64ur32(n uint32) uint64 {
+ var x uint64
+ return x >> n
+}
+
+//go:noinline
+func ofz64ur16(n uint16) uint64 {
+ var x uint64
+ return x >> n
+}
+
+//go:noinline
+func ofz64ur8(n uint8) uint64 {
+ var x uint64
+ return x >> n
+}
+
+//go:noinline
+func ofz32l64(n uint64) int32 {
+ var x int32
+ return x << n
+}
+
+//go:noinline
+func ofz32l32(n uint32) int32 {
+ var x int32
+ return x << n
+}
+
+//go:noinline
+func ofz32l16(n uint16) int32 {
+ var x int32
+ return x << n
+}
+
+//go:noinline
+func ofz32l8(n uint8) int32 {
+ var x int32
+ return x << n
+}
+
+//go:noinline
+func ofz32r64(n uint64) int32 {
+ var x int32
+ return x >> n
+}
+
+//go:noinline
+func ofz32r32(n uint32) int32 {
+ var x int32
+ return x >> n
+}
+
+//go:noinline
+func ofz32r16(n uint16) int32 {
+ var x int32
+ return x >> n
+}
+
+//go:noinline
+func ofz32r8(n uint8) int32 {
+ var x int32
+ return x >> n
+}
+
+//go:noinline
+func ofz32ur64(n uint64) uint32 {
+ var x uint32
+ return x >> n
+}
+
+//go:noinline
+func ofz32ur32(n uint32) uint32 {
+ var x uint32
+ return x >> n
+}
+
+//go:noinline
+func ofz32ur16(n uint16) uint32 {
+ var x uint32
+ return x >> n
+}
+
+//go:noinline
+func ofz32ur8(n uint8) uint32 {
+ var x uint32
+ return x >> n
+}
+
+//go:noinline
+func ofz16l64(n uint64) int16 {
+ var x int16
+ return x << n
+}
+
+//go:noinline
+func ofz16l32(n uint32) int16 {
+ var x int16
+ return x << n
+}
+
+//go:noinline
+func ofz16l16(n uint16) int16 {
+ var x int16
+ return x << n
+}
+
+//go:noinline
+func ofz16l8(n uint8) int16 {
+ var x int16
+ return x << n
+}
+
+//go:noinline
+func ofz16r64(n uint64) int16 {
+ var x int16
+ return x >> n
+}
+
+//go:noinline
+func ofz16r32(n uint32) int16 {
+ var x int16
+ return x >> n
+}
+
+//go:noinline
+func ofz16r16(n uint16) int16 {
+ var x int16
+ return x >> n
+}
+
+//go:noinline
+func ofz16r8(n uint8) int16 {
+ var x int16
+ return x >> n
+}
+
+//go:noinline
+func ofz16ur64(n uint64) uint16 {
+ var x uint16
+ return x >> n
+}
+
+//go:noinline
+func ofz16ur32(n uint32) uint16 {
+ var x uint16
+ return x >> n
+}
+
+//go:noinline
+func ofz16ur16(n uint16) uint16 {
+ var x uint16
+ return x >> n
+}
+
+//go:noinline
+func ofz16ur8(n uint8) uint16 {
+ var x uint16
+ return x >> n
+}
+
+//go:noinline
+func ofz8l64(n uint64) int8 {
+ var x int8
+ return x << n
+}
+
+//go:noinline
+func ofz8l32(n uint32) int8 {
+ var x int8
+ return x << n
+}
+
+//go:noinline
+func ofz8l16(n uint16) int8 {
+ var x int8
+ return x << n
+}
+
+//go:noinline
+func ofz8l8(n uint8) int8 {
+ var x int8
+ return x << n
+}
+
+//go:noinline
+func ofz8r64(n uint64) int8 {
+ var x int8
+ return x >> n
+}
+
+//go:noinline
+func ofz8r32(n uint32) int8 {
+ var x int8
+ return x >> n
+}
+
+//go:noinline
+func ofz8r16(n uint16) int8 {
+ var x int8
+ return x >> n
+}
+
+//go:noinline
+func ofz8r8(n uint8) int8 {
+ var x int8
+ return x >> n
+}
+
+//go:noinline
+func ofz8ur64(n uint64) uint8 {
+ var x uint8
+ return x >> n
+}
+
+//go:noinline
+func ofz8ur32(n uint32) uint8 {
+ var x uint8
+ return x >> n
+}
+
+//go:noinline
+func ofz8ur16(n uint16) uint8 {
+ var x uint8
+ return x >> n
+}
+
+//go:noinline
+func ofz8ur8(n uint8) uint8 {
+ var x uint8
+ return x >> n
+}
+
+func TestShiftOfZero(t *testing.T) {
+ if got := ofz64l64(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz64l32(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz64l16(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz64l8(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz64r64(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz64r32(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz64r16(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz64r8(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz64ur64(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz64ur32(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz64ur16(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz64ur8(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+
+ if got := ofz32l64(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz32l32(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz32l16(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz32l8(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz32r64(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz32r32(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz32r16(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz32r8(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz32ur64(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz32ur32(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz32ur16(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz32ur8(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+
+ if got := ofz16l64(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz16l32(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz16l16(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz16l8(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz16r64(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz16r32(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz16r16(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz16r8(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz16ur64(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz16ur32(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz16ur16(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz16ur8(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+
+ if got := ofz8l64(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz8l32(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz8l16(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz8l8(5); got != 0 {
+ t.Errorf("0<<5 == %d, want 0", got)
+ }
+ if got := ofz8r64(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz8r32(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz8r16(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz8r8(5); got != 0 {
+ t.Errorf("0>>5 == %d, want 0", got)
+ }
+ if got := ofz8ur64(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz8ur32(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz8ur16(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+ if got := ofz8ur8(5); got != 0 {
+ t.Errorf("0>>>5 == %d, want 0", got)
+ }
+}
+
+//go:noinline
+func byz64l(n int64) int64 {
+ return n << 0
+}
+
+//go:noinline
+func byz64r(n int64) int64 {
+ return n >> 0
+}
+
+//go:noinline
+func byz64ur(n uint64) uint64 {
+ return n >> 0
+}
+
+//go:noinline
+func byz32l(n int32) int32 {
+ return n << 0
+}
+
+//go:noinline
+func byz32r(n int32) int32 {
+ return n >> 0
+}
+
+//go:noinline
+func byz32ur(n uint32) uint32 {
+ return n >> 0
+}
+
+//go:noinline
+func byz16l(n int16) int16 {
+ return n << 0
+}
+
+//go:noinline
+func byz16r(n int16) int16 {
+ return n >> 0
+}
+
+//go:noinline
+func byz16ur(n uint16) uint16 {
+ return n >> 0
+}
+
+//go:noinline
+func byz8l(n int8) int8 {
+ return n << 0
+}
+
+//go:noinline
+func byz8r(n int8) int8 {
+ return n >> 0
+}
+
+//go:noinline
+func byz8ur(n uint8) uint8 {
+ return n >> 0
+}
+
+func TestShiftByZero(t *testing.T) {
+ {
+ var n int64 = 0x5555555555555555
+ if got := byz64l(n); got != n {
+ t.Errorf("%x<<0 == %x, want %x", n, got, n)
+ }
+ if got := byz64r(n); got != n {
+ t.Errorf("%x>>0 == %x, want %x", n, got, n)
+ }
+ }
+ {
+ var n uint64 = 0xaaaaaaaaaaaaaaaa
+ if got := byz64ur(n); got != n {
+ t.Errorf("%x>>>0 == %x, want %x", n, got, n)
+ }
+ }
+
+ {
+ var n int32 = 0x55555555
+ if got := byz32l(n); got != n {
+ t.Errorf("%x<<0 == %x, want %x", n, got, n)
+ }
+ if got := byz32r(n); got != n {
+ t.Errorf("%x>>0 == %x, want %x", n, got, n)
+ }
+ }
+ {
+ var n uint32 = 0xaaaaaaaa
+ if got := byz32ur(n); got != n {
+ t.Errorf("%x>>>0 == %x, want %x", n, got, n)
+ }
+ }
+
+ {
+ var n int16 = 0x5555
+ if got := byz16l(n); got != n {
+ t.Errorf("%x<<0 == %x, want %x", n, got, n)
+ }
+ if got := byz16r(n); got != n {
+ t.Errorf("%x>>0 == %x, want %x", n, got, n)
+ }
+ }
+ {
+ var n uint16 = 0xaaaa
+ if got := byz16ur(n); got != n {
+ t.Errorf("%x>>>0 == %x, want %x", n, got, n)
+ }
+ }
+
+ {
+ var n int8 = 0x55
+ if got := byz8l(n); got != n {
+ t.Errorf("%x<<0 == %x, want %x", n, got, n)
+ }
+ if got := byz8r(n); got != n {
+ t.Errorf("%x>>0 == %x, want %x", n, got, n)
+ }
+ }
+ {
+ var n uint8 = 0x55
+ if got := byz8ur(n); got != n {
+ t.Errorf("%x>>>0 == %x, want %x", n, got, n)
+ }
+ }
+}
+
+//go:noinline
+func two64l(x int64) int64 {
+ return x << 1 << 1
+}
+
+//go:noinline
+func two64r(x int64) int64 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two64ur(x uint64) uint64 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two32l(x int32) int32 {
+ return x << 1 << 1
+}
+
+//go:noinline
+func two32r(x int32) int32 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two32ur(x uint32) uint32 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two16l(x int16) int16 {
+ return x << 1 << 1
+}
+
+//go:noinline
+func two16r(x int16) int16 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two16ur(x uint16) uint16 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two8l(x int8) int8 {
+ return x << 1 << 1
+}
+
+//go:noinline
+func two8r(x int8) int8 {
+ return x >> 1 >> 1
+}
+
+//go:noinline
+func two8ur(x uint8) uint8 {
+ return x >> 1 >> 1
+}
+
+func TestShiftCombine(t *testing.T) {
+ if got, want := two64l(4), int64(16); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := two64r(64), int64(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two64ur(64), uint64(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two32l(4), int32(16); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := two32r(64), int32(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two32ur(64), uint32(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two16l(4), int16(16); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := two16r(64), int16(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two16ur(64), uint16(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two8l(4), int8(16); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := two8r(64), int8(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := two8ur(64), uint8(16); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+
+}
+
+//go:noinline
+func three64l(x int64) int64 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three64ul(x uint64) uint64 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three64r(x int64) int64 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three64ur(x uint64) uint64 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three32l(x int32) int32 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three32ul(x uint32) uint32 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three32r(x int32) int32 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three32ur(x uint32) uint32 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three16l(x int16) int16 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three16ul(x uint16) uint16 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three16r(x int16) int16 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three16ur(x uint16) uint16 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three8l(x int8) int8 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three8ul(x uint8) uint8 {
+ return x << 3 >> 1 << 2
+}
+
+//go:noinline
+func three8r(x int8) int8 {
+ return x >> 3 << 1 >> 2
+}
+
+//go:noinline
+func three8ur(x uint8) uint8 {
+ return x >> 3 << 1 >> 2
+}
+
+func TestShiftCombine3(t *testing.T) {
+ if got, want := three64l(4), int64(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three64ul(4), uint64(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three64r(64), int64(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three64ur(64), uint64(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three32l(4), int32(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three32ul(4), uint32(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three32r(64), int32(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three32ur(64), uint32(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three16l(4), int16(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three16ul(4), uint16(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three16r(64), int16(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three16ur(64), uint16(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three8l(4), int8(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three8ul(4), uint8(64); want != got {
+ t.Errorf("4<<1<<1 == %d, want %d", got, want)
+ }
+ if got, want := three8r(64), int8(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+ if got, want := three8ur(64), uint8(4); want != got {
+ t.Errorf("64>>1>>1 == %d, want %d", got, want)
+ }
+}
+
+var (
+ one64 int64 = 1
+ one64u uint64 = 1
+ one32 int32 = 1
+ one32u uint32 = 1
+ one16 int16 = 1
+ one16u uint16 = 1
+ one8 int8 = 1
+ one8u uint8 = 1
+)
+
+func TestShiftLargeCombine(t *testing.T) {
+ var N uint64 = 0x8000000000000000
+ if one64<<N<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one64>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one64u>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32<<N<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32u>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16<<N<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16u>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8<<N<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8u>>N>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+}
+
+func TestShiftLargeCombine3(t *testing.T) {
+ var N uint64 = 0x8000000000000001
+ if one64<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one64u<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one64>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one64u>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32u<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one32u>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16u<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one16u>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8u<<N>>2<<N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+ if one8u>>N<<2>>N == 1 {
+ t.Errorf("shift overflow mishandled")
+ }
+}
+
+func TestShiftGeneric(t *testing.T) {
+ for _, test := range [...]struct {
+ valueWidth int
+ signed bool
+ shiftWidth int
+ left bool
+ f interface{}
+ }{
+ {64, true, 64, true, func(n int64, s uint64) int64 { return n << s }},
+ {64, true, 64, false, func(n int64, s uint64) int64 { return n >> s }},
+ {64, false, 64, false, func(n uint64, s uint64) uint64 { return n >> s }},
+ {64, true, 32, true, func(n int64, s uint32) int64 { return n << s }},
+ {64, true, 32, false, func(n int64, s uint32) int64 { return n >> s }},
+ {64, false, 32, false, func(n uint64, s uint32) uint64 { return n >> s }},
+ {64, true, 16, true, func(n int64, s uint16) int64 { return n << s }},
+ {64, true, 16, false, func(n int64, s uint16) int64 { return n >> s }},
+ {64, false, 16, false, func(n uint64, s uint16) uint64 { return n >> s }},
+ {64, true, 8, true, func(n int64, s uint8) int64 { return n << s }},
+ {64, true, 8, false, func(n int64, s uint8) int64 { return n >> s }},
+ {64, false, 8, false, func(n uint64, s uint8) uint64 { return n >> s }},
+
+ {32, true, 64, true, func(n int32, s uint64) int32 { return n << s }},
+ {32, true, 64, false, func(n int32, s uint64) int32 { return n >> s }},
+ {32, false, 64, false, func(n uint32, s uint64) uint32 { return n >> s }},
+ {32, true, 32, true, func(n int32, s uint32) int32 { return n << s }},
+ {32, true, 32, false, func(n int32, s uint32) int32 { return n >> s }},
+ {32, false, 32, false, func(n uint32, s uint32) uint32 { return n >> s }},
+ {32, true, 16, true, func(n int32, s uint16) int32 { return n << s }},
+ {32, true, 16, false, func(n int32, s uint16) int32 { return n >> s }},
+ {32, false, 16, false, func(n uint32, s uint16) uint32 { return n >> s }},
+ {32, true, 8, true, func(n int32, s uint8) int32 { return n << s }},
+ {32, true, 8, false, func(n int32, s uint8) int32 { return n >> s }},
+ {32, false, 8, false, func(n uint32, s uint8) uint32 { return n >> s }},
+
+ {16, true, 64, true, func(n int16, s uint64) int16 { return n << s }},
+ {16, true, 64, false, func(n int16, s uint64) int16 { return n >> s }},
+ {16, false, 64, false, func(n uint16, s uint64) uint16 { return n >> s }},
+ {16, true, 32, true, func(n int16, s uint32) int16 { return n << s }},
+ {16, true, 32, false, func(n int16, s uint32) int16 { return n >> s }},
+ {16, false, 32, false, func(n uint16, s uint32) uint16 { return n >> s }},
+ {16, true, 16, true, func(n int16, s uint16) int16 { return n << s }},
+ {16, true, 16, false, func(n int16, s uint16) int16 { return n >> s }},
+ {16, false, 16, false, func(n uint16, s uint16) uint16 { return n >> s }},
+ {16, true, 8, true, func(n int16, s uint8) int16 { return n << s }},
+ {16, true, 8, false, func(n int16, s uint8) int16 { return n >> s }},
+ {16, false, 8, false, func(n uint16, s uint8) uint16 { return n >> s }},
+
+ {8, true, 64, true, func(n int8, s uint64) int8 { return n << s }},
+ {8, true, 64, false, func(n int8, s uint64) int8 { return n >> s }},
+ {8, false, 64, false, func(n uint8, s uint64) uint8 { return n >> s }},
+ {8, true, 32, true, func(n int8, s uint32) int8 { return n << s }},
+ {8, true, 32, false, func(n int8, s uint32) int8 { return n >> s }},
+ {8, false, 32, false, func(n uint8, s uint32) uint8 { return n >> s }},
+ {8, true, 16, true, func(n int8, s uint16) int8 { return n << s }},
+ {8, true, 16, false, func(n int8, s uint16) int8 { return n >> s }},
+ {8, false, 16, false, func(n uint8, s uint16) uint8 { return n >> s }},
+ {8, true, 8, true, func(n int8, s uint8) int8 { return n << s }},
+ {8, true, 8, false, func(n int8, s uint8) int8 { return n >> s }},
+ {8, false, 8, false, func(n uint8, s uint8) uint8 { return n >> s }},
+ } {
+ fv := reflect.ValueOf(test.f)
+ var args [2]reflect.Value
+ for i := 0; i < test.valueWidth; i++ {
+ // Build value to be shifted.
+ var n int64 = 1
+ for j := 0; j < i; j++ {
+ n <<= 1
+ }
+ args[0] = reflect.ValueOf(n).Convert(fv.Type().In(0))
+ for s := 0; s <= test.shiftWidth; s++ {
+ args[1] = reflect.ValueOf(s).Convert(fv.Type().In(1))
+
+ // Compute desired result. We're testing variable shifts
+ // assuming constant shifts are correct.
+ r := n
+ var op string
+ switch {
+ case test.left:
+ op = "<<"
+ for j := 0; j < s; j++ {
+ r <<= 1
+ }
+ switch test.valueWidth {
+ case 32:
+ r = int64(int32(r))
+ case 16:
+ r = int64(int16(r))
+ case 8:
+ r = int64(int8(r))
+ }
+ case test.signed:
+ op = ">>"
+ switch test.valueWidth {
+ case 32:
+ r = int64(int32(r))
+ case 16:
+ r = int64(int16(r))
+ case 8:
+ r = int64(int8(r))
+ }
+ for j := 0; j < s; j++ {
+ r >>= 1
+ }
+ default:
+ op = ">>>"
+ for j := 0; j < s; j++ {
+ r = int64(uint64(r) >> 1)
+ }
+ }
+
+ // Call function.
+ res := fv.Call(args[:])[0].Convert(reflect.ValueOf(r).Type())
+
+ if res.Int() != r {
+ t.Errorf("%s%dx%d(%x,%x)=%x, want %x", op, test.valueWidth, test.shiftWidth, n, s, res.Int(), r)
+ }
+ }
+ }
+ }
+}
+
+var shiftSink64 int64
+
+func BenchmarkShiftArithmeticRight(b *testing.B) {
+ x := shiftSink64
+ for i := 0; i < b.N; i++ {
+ x = x >> (i & 63)
+ }
+ shiftSink64 = x
+}
+
+//go:noinline
+func incorrectRotate1(x, c uint64) uint64 {
+ // This should not compile to a rotate instruction.
+ return x<<c | x>>(64-c)
+}
+
+//go:noinline
+func incorrectRotate2(x uint64) uint64 {
+ var c uint64 = 66
+ // This should not compile to a rotate instruction.
+ return x<<c | x>>(64-c)
+}
+
+func TestIncorrectRotate(t *testing.T) {
+ if got := incorrectRotate1(1, 66); got != 0 {
+ t.Errorf("got %x want 0", got)
+ }
+ if got := incorrectRotate2(1); got != 0 {
+ t.Errorf("got %x want 0", got)
+ }
+}
+
+//go:noinline
+func variableShiftOverflow64x8(x int64, y, z uint8) (a, b, c int64) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int64(uint64(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow32x8(x int32, y, z uint8) (a, b, c int32) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int32(uint32(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow16x8(x int16, y, z uint8) (a, b, c int16) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int16(uint16(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow8x8(x int8, y, z uint8) (a, b, c int8) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int8(uint8(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow64x16(x int64, y, z uint16) (a, b, c int64) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int64(uint64(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow32x16(x int32, y, z uint16) (a, b, c int32) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int32(uint32(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow16x16(x int16, y, z uint16) (a, b, c int16) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int16(uint16(x) >> (y + z))
+}
+
+//go:noinline
+func variableShiftOverflow8x16(x int8, y, z uint16) (a, b, c int8) {
+ // Verify junk bits are ignored when doing a variable shift.
+ return x >> (y + z), x << (y + z), int8(uint8(x) >> (y + z))
+}
+
+//go:noinline
+func makeU8(x uint64) uint8 {
+ // Ensure the upper portions of the register are clear before testing large shift values
+ // using non-native types (e.g uint8 on PPC64).
+ return uint8(x)
+}
+
+//go:noinline
+func makeU16(x uint64) uint16 {
+ // Ensure the upper portions of the register are clear before testing large shift values
+ // using non-native types (e.g uint8 on PPC64).
+ return uint16(x)
+}
+
+func TestShiftOverflow(t *testing.T) {
+ if v, w, z := variableShiftOverflow64x8(-64, makeU8(255), 2); v != -32 || w != -128 || z != 0x7fffffffffffffe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fffffffffffffe0", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow32x8(-64, makeU8(255), 2); v != -32 || w != -128 || z != 0x7fffffe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fffffe0", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow16x8(-64, makeU8(255), 2); v != -32 || w != -128 || z != 0x7fe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fe0", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow8x8(-64, makeU8(255), 2); v != -32 || w != -128 || z != 0x60 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x60", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow64x16(-64, makeU16(0xffff), 2); v != -32 || w != -128 || z != 0x7fffffffffffffe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fffffffffffffe0", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow32x16(-64, makeU16(0xffff), 2); v != -32 || w != -128 || z != 0x7fffffe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fffffe0,", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow16x16(-64, makeU16(0xffff), 2); v != -32 || w != -128 || z != 0x7fe0 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x7fe0", v, w, z)
+ }
+ if v, w, z := variableShiftOverflow8x16(-64, makeU16(0xffff), 2); v != -32 || w != -128 || z != 0x60 {
+ t.Errorf("got %d %d 0x%x, expected -32 -128 0x60", v, w, z)
+ }
+}
diff --git a/src/cmd/compile/internal/test/ssa_test.go b/src/cmd/compile/internal/test/ssa_test.go
new file mode 100644
index 0000000..5f8acdc
--- /dev/null
+++ b/src/cmd/compile/internal/test/ssa_test.go
@@ -0,0 +1,179 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "bytes"
+ "fmt"
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "internal/testenv"
+ "os"
+ "path/filepath"
+ "runtime"
+ "strings"
+ "testing"
+)
+
+// runGenTest runs a test-generator, then runs the generated test.
+// Generated test can either fail in compilation or execution.
+// The environment variable parameter(s) is passed to the run
+// of the generated test.
+func runGenTest(t *testing.T, filename, tmpname string, ev ...string) {
+ testenv.MustHaveGoRun(t)
+ gotool := testenv.GoToolPath(t)
+ var stdout, stderr bytes.Buffer
+ cmd := testenv.Command(t, gotool, "run", filepath.Join("testdata", filename))
+ cmd.Stdout = &stdout
+ cmd.Stderr = &stderr
+ if err := cmd.Run(); err != nil {
+ t.Fatalf("Failed: %v:\nOut: %s\nStderr: %s\n", err, &stdout, &stderr)
+ }
+ // Write stdout into a temporary file
+ rungo := filepath.Join(t.TempDir(), "run.go")
+ ok := os.WriteFile(rungo, stdout.Bytes(), 0600)
+ if ok != nil {
+ t.Fatalf("Failed to create temporary file " + rungo)
+ }
+
+ stdout.Reset()
+ stderr.Reset()
+ cmd = testenv.Command(t, gotool, "run", "-gcflags=-d=ssa/check/on", rungo)
+ cmd.Stdout = &stdout
+ cmd.Stderr = &stderr
+ cmd.Env = append(cmd.Env, ev...)
+ err := cmd.Run()
+ if err != nil {
+ t.Fatalf("Failed: %v:\nOut: %s\nStderr: %s\n", err, &stdout, &stderr)
+ }
+ if s := stderr.String(); s != "" {
+ t.Errorf("Stderr = %s\nWant empty", s)
+ }
+ if s := stdout.String(); s != "" {
+ t.Errorf("Stdout = %s\nWant empty", s)
+ }
+}
+
+func TestGenFlowGraph(t *testing.T) {
+ if testing.Short() {
+ t.Skip("not run in short mode.")
+ }
+ runGenTest(t, "flowgraph_generator1.go", "ssa_fg_tmp1")
+}
+
+// TestCode runs all the tests in the testdata directory as subtests.
+// These tests are special because we want to run them with different
+// compiler flags set (and thus they can't just be _test.go files in
+// this directory).
+func TestCode(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ gotool := testenv.GoToolPath(t)
+
+ // Make a temporary directory to work in.
+ tmpdir := t.TempDir()
+
+ // Find all the test functions (and the files containing them).
+ var srcs []string // files containing Test functions
+ type test struct {
+ name string // TestFoo
+ usesFloat bool // might use float operations
+ }
+ var tests []test
+ files, err := os.ReadDir("testdata")
+ if err != nil {
+ t.Fatalf("can't read testdata directory: %v", err)
+ }
+ for _, f := range files {
+ if !strings.HasSuffix(f.Name(), "_test.go") {
+ continue
+ }
+ text, err := os.ReadFile(filepath.Join("testdata", f.Name()))
+ if err != nil {
+ t.Fatalf("can't read testdata/%s: %v", f.Name(), err)
+ }
+ fset := token.NewFileSet()
+ code, err := parser.ParseFile(fset, f.Name(), text, 0)
+ if err != nil {
+ t.Fatalf("can't parse testdata/%s: %v", f.Name(), err)
+ }
+ srcs = append(srcs, filepath.Join("testdata", f.Name()))
+ foundTest := false
+ for _, d := range code.Decls {
+ fd, ok := d.(*ast.FuncDecl)
+ if !ok {
+ continue
+ }
+ if !strings.HasPrefix(fd.Name.Name, "Test") {
+ continue
+ }
+ if fd.Recv != nil {
+ continue
+ }
+ if fd.Type.Results != nil {
+ continue
+ }
+ if len(fd.Type.Params.List) != 1 {
+ continue
+ }
+ p := fd.Type.Params.List[0]
+ if len(p.Names) != 1 {
+ continue
+ }
+ s, ok := p.Type.(*ast.StarExpr)
+ if !ok {
+ continue
+ }
+ sel, ok := s.X.(*ast.SelectorExpr)
+ if !ok {
+ continue
+ }
+ base, ok := sel.X.(*ast.Ident)
+ if !ok {
+ continue
+ }
+ if base.Name != "testing" {
+ continue
+ }
+ if sel.Sel.Name != "T" {
+ continue
+ }
+ // Found a testing function.
+ tests = append(tests, test{name: fd.Name.Name, usesFloat: bytes.Contains(text, []byte("float"))})
+ foundTest = true
+ }
+ if !foundTest {
+ t.Fatalf("test file testdata/%s has no tests in it", f.Name())
+ }
+ }
+
+ flags := []string{""}
+ if runtime.GOARCH == "arm" || runtime.GOARCH == "mips" || runtime.GOARCH == "mips64" || runtime.GOARCH == "386" {
+ flags = append(flags, ",softfloat")
+ }
+ for _, flag := range flags {
+ args := []string{"test", "-c", "-gcflags=-d=ssa/check/on" + flag, "-o", filepath.Join(tmpdir, "code.test")}
+ args = append(args, srcs...)
+ out, err := testenv.Command(t, gotool, args...).CombinedOutput()
+ if err != nil || len(out) != 0 {
+ t.Fatalf("Build failed: %v\n%s\n", err, out)
+ }
+
+ // Now we have a test binary. Run it with all the tests as subtests of this one.
+ for _, test := range tests {
+ test := test
+ if flag == ",softfloat" && !test.usesFloat {
+ // No point in running the soft float version if the test doesn't use floats.
+ continue
+ }
+ t.Run(fmt.Sprintf("%s%s", test.name[4:], flag), func(t *testing.T) {
+ out, err := testenv.Command(t, filepath.Join(tmpdir, "code.test"), "-test.run="+test.name).CombinedOutput()
+ if err != nil || string(out) != "PASS\n" {
+ t.Errorf("Failed:\n%s\n", out)
+ }
+ })
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/switch_test.go b/src/cmd/compile/internal/test/switch_test.go
new file mode 100644
index 0000000..30dee62
--- /dev/null
+++ b/src/cmd/compile/internal/test/switch_test.go
@@ -0,0 +1,137 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "math/bits"
+ "testing"
+)
+
+func BenchmarkSwitch8Predictable(b *testing.B) {
+ benchmarkSwitch8(b, true)
+}
+func BenchmarkSwitch8Unpredictable(b *testing.B) {
+ benchmarkSwitch8(b, false)
+}
+func benchmarkSwitch8(b *testing.B, predictable bool) {
+ n := 0
+ rng := newRNG()
+ for i := 0; i < b.N; i++ {
+ rng = rng.next(predictable)
+ switch rng.value() & 7 {
+ case 0:
+ n += 1
+ case 1:
+ n += 2
+ case 2:
+ n += 3
+ case 3:
+ n += 4
+ case 4:
+ n += 5
+ case 5:
+ n += 6
+ case 6:
+ n += 7
+ case 7:
+ n += 8
+ }
+ }
+ sink = n
+}
+
+func BenchmarkSwitch32Predictable(b *testing.B) {
+ benchmarkSwitch32(b, true)
+}
+func BenchmarkSwitch32Unpredictable(b *testing.B) {
+ benchmarkSwitch32(b, false)
+}
+func benchmarkSwitch32(b *testing.B, predictable bool) {
+ n := 0
+ rng := newRNG()
+ for i := 0; i < b.N; i++ {
+ rng = rng.next(predictable)
+ switch rng.value() & 31 {
+ case 0, 1, 2:
+ n += 1
+ case 4, 5, 6:
+ n += 2
+ case 8, 9, 10:
+ n += 3
+ case 12, 13, 14:
+ n += 4
+ case 16, 17, 18:
+ n += 5
+ case 20, 21, 22:
+ n += 6
+ case 24, 25, 26:
+ n += 7
+ case 28, 29, 30:
+ n += 8
+ default:
+ n += 9
+ }
+ }
+ sink = n
+}
+
+func BenchmarkSwitchStringPredictable(b *testing.B) {
+ benchmarkSwitchString(b, true)
+}
+func BenchmarkSwitchStringUnpredictable(b *testing.B) {
+ benchmarkSwitchString(b, false)
+}
+func benchmarkSwitchString(b *testing.B, predictable bool) {
+ a := []string{
+ "foo",
+ "foo1",
+ "foo22",
+ "foo333",
+ "foo4444",
+ "foo55555",
+ "foo666666",
+ "foo7777777",
+ }
+ n := 0
+ rng := newRNG()
+ for i := 0; i < b.N; i++ {
+ rng = rng.next(predictable)
+ switch a[rng.value()&7] {
+ case "foo":
+ n += 1
+ case "foo1":
+ n += 2
+ case "foo22":
+ n += 3
+ case "foo333":
+ n += 4
+ case "foo4444":
+ n += 5
+ case "foo55555":
+ n += 6
+ case "foo666666":
+ n += 7
+ case "foo7777777":
+ n += 8
+ }
+ }
+ sink = n
+}
+
+// A simple random number generator used to make switches conditionally predictable.
+type rng uint64
+
+func newRNG() rng {
+ return 1
+}
+func (r rng) next(predictable bool) rng {
+ if predictable {
+ return r + 1
+ }
+ return rng(bits.RotateLeft64(uint64(r), 13) * 0x3c374d)
+}
+func (r rng) value() uint64 {
+ return uint64(r)
+}
diff --git a/src/cmd/compile/internal/test/test.go b/src/cmd/compile/internal/test/test.go
new file mode 100644
index 0000000..56e5404
--- /dev/null
+++ b/src/cmd/compile/internal/test/test.go
@@ -0,0 +1 @@
+package test
diff --git a/src/cmd/compile/internal/test/testdata/addressed_test.go b/src/cmd/compile/internal/test/testdata/addressed_test.go
new file mode 100644
index 0000000..4cc9ac4
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/addressed_test.go
@@ -0,0 +1,214 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "testing"
+)
+
+var output string
+
+func mypanic(t *testing.T, s string) {
+ t.Fatalf(s + "\n" + output)
+
+}
+
+func assertEqual(t *testing.T, x, y int) {
+ if x != y {
+ mypanic(t, fmt.Sprintf("assertEqual failed got %d, want %d", x, y))
+ }
+}
+
+func TestAddressed(t *testing.T) {
+ x := f1_ssa(2, 3)
+ output += fmt.Sprintln("*x is", *x)
+ output += fmt.Sprintln("Gratuitously use some stack")
+ output += fmt.Sprintln("*x is", *x)
+ assertEqual(t, *x, 9)
+
+ w := f3a_ssa(6)
+ output += fmt.Sprintln("*w is", *w)
+ output += fmt.Sprintln("Gratuitously use some stack")
+ output += fmt.Sprintln("*w is", *w)
+ assertEqual(t, *w, 6)
+
+ y := f3b_ssa(12)
+ output += fmt.Sprintln("*y.(*int) is", *y.(*int))
+ output += fmt.Sprintln("Gratuitously use some stack")
+ output += fmt.Sprintln("*y.(*int) is", *y.(*int))
+ assertEqual(t, *y.(*int), 12)
+
+ z := f3c_ssa(8)
+ output += fmt.Sprintln("*z.(*int) is", *z.(*int))
+ output += fmt.Sprintln("Gratuitously use some stack")
+ output += fmt.Sprintln("*z.(*int) is", *z.(*int))
+ assertEqual(t, *z.(*int), 8)
+
+ args(t)
+ test_autos(t)
+}
+
+//go:noinline
+func f1_ssa(x, y int) *int {
+ x = x*y + y
+ return &x
+}
+
+//go:noinline
+func f3a_ssa(x int) *int {
+ return &x
+}
+
+//go:noinline
+func f3b_ssa(x int) interface{} { // ./foo.go:15: internal error: f3b_ssa ~r1 (type interface {}) recorded as live on entry
+ return &x
+}
+
+//go:noinline
+func f3c_ssa(y int) interface{} {
+ x := y
+ return &x
+}
+
+type V struct {
+ p *V
+ w, x int64
+}
+
+func args(t *testing.T) {
+ v := V{p: nil, w: 1, x: 1}
+ a := V{p: &v, w: 2, x: 2}
+ b := V{p: &v, w: 0, x: 0}
+ i := v.args_ssa(a, b)
+ output += fmt.Sprintln("i=", i)
+ assertEqual(t, int(i), 2)
+}
+
+//go:noinline
+func (v V) args_ssa(a, b V) int64 {
+ if v.w == 0 {
+ return v.x
+ }
+ if v.w == 1 {
+ return a.x
+ }
+ if v.w == 2 {
+ return b.x
+ }
+ b.p.p = &a // v.p in caller = &a
+
+ return -1
+}
+
+func test_autos(t *testing.T) {
+ test(t, 11)
+ test(t, 12)
+ test(t, 13)
+ test(t, 21)
+ test(t, 22)
+ test(t, 23)
+ test(t, 31)
+ test(t, 32)
+}
+
+func test(t *testing.T, which int64) {
+ output += fmt.Sprintln("test", which)
+ v1 := V{w: 30, x: 3, p: nil}
+ v2, v3 := v1.autos_ssa(which, 10, 1, 20, 2)
+ if which != v2.val() {
+ output += fmt.Sprintln("Expected which=", which, "got v2.val()=", v2.val())
+ mypanic(t, "Failure of expected V value")
+ }
+ if v2.p.val() != v3.val() {
+ output += fmt.Sprintln("Expected v2.p.val()=", v2.p.val(), "got v3.val()=", v3.val())
+ mypanic(t, "Failure of expected V.p value")
+ }
+ if which != v3.p.p.p.p.p.p.p.val() {
+ output += fmt.Sprintln("Expected which=", which, "got v3.p.p.p.p.p.p.p.val()=", v3.p.p.p.p.p.p.p.val())
+ mypanic(t, "Failure of expected V.p value")
+ }
+}
+
+func (v V) val() int64 {
+ return v.w + v.x
+}
+
+// autos_ssa uses contents of v and parameters w1, w2, x1, x2
+// to initialize a bunch of locals, all of which have their
+// address taken to force heap allocation, and then based on
+// the value of which a pair of those locals are copied in
+// various ways to the two results y, and z, which are also
+// addressed. Which is expected to be one of 11-13, 21-23, 31, 32,
+// and y.val() should be equal to which and y.p.val() should
+// be equal to z.val(). Also, x(.p)**8 == x; that is, the
+// autos are all linked into a ring.
+//
+//go:noinline
+func (v V) autos_ssa(which, w1, x1, w2, x2 int64) (y, z V) {
+ fill_ssa(v.w, v.x, &v, v.p) // gratuitous no-op to force addressing
+ var a, b, c, d, e, f, g, h V
+ fill_ssa(w1, x1, &a, &b)
+ fill_ssa(w1, x2, &b, &c)
+ fill_ssa(w1, v.x, &c, &d)
+ fill_ssa(w2, x1, &d, &e)
+ fill_ssa(w2, x2, &e, &f)
+ fill_ssa(w2, v.x, &f, &g)
+ fill_ssa(v.w, x1, &g, &h)
+ fill_ssa(v.w, x2, &h, &a)
+ switch which {
+ case 11:
+ y = a
+ z.getsI(&b)
+ case 12:
+ y.gets(&b)
+ z = c
+ case 13:
+ y.gets(&c)
+ z = d
+ case 21:
+ y.getsI(&d)
+ z.gets(&e)
+ case 22:
+ y = e
+ z = f
+ case 23:
+ y.gets(&f)
+ z.getsI(&g)
+ case 31:
+ y = g
+ z.gets(&h)
+ case 32:
+ y.getsI(&h)
+ z = a
+ default:
+
+ panic("")
+ }
+ return
+}
+
+// gets is an address-mentioning way of implementing
+// structure assignment.
+//
+//go:noinline
+func (to *V) gets(from *V) {
+ *to = *from
+}
+
+// gets is an address-and-interface-mentioning way of
+// implementing structure assignment.
+//
+//go:noinline
+func (to *V) getsI(from interface{}) {
+ *to = *from.(*V)
+}
+
+// fill_ssa initializes r with V{w:w, x:x, p:p}
+//
+//go:noinline
+func fill_ssa(w, x int64, r, p *V) {
+ *r = V{w: w, x: x, p: p}
+}
diff --git a/src/cmd/compile/internal/test/testdata/append_test.go b/src/cmd/compile/internal/test/testdata/append_test.go
new file mode 100644
index 0000000..6663ce7
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/append_test.go
@@ -0,0 +1,61 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// append_ssa.go tests append operations.
+package main
+
+import "testing"
+
+//go:noinline
+func appendOne_ssa(a []int, x int) []int {
+ return append(a, x)
+}
+
+//go:noinline
+func appendThree_ssa(a []int, x, y, z int) []int {
+ return append(a, x, y, z)
+}
+
+func eqBytes(a, b []int) bool {
+ if len(a) != len(b) {
+ return false
+ }
+ for i := range a {
+ if a[i] != b[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func expect(t *testing.T, got, want []int) {
+ if eqBytes(got, want) {
+ return
+ }
+ t.Errorf("expected %v, got %v\n", want, got)
+}
+
+func testAppend(t *testing.T) {
+ var store [7]int
+ a := store[:0]
+
+ a = appendOne_ssa(a, 1)
+ expect(t, a, []int{1})
+ a = appendThree_ssa(a, 2, 3, 4)
+ expect(t, a, []int{1, 2, 3, 4})
+ a = appendThree_ssa(a, 5, 6, 7)
+ expect(t, a, []int{1, 2, 3, 4, 5, 6, 7})
+ if &a[0] != &store[0] {
+ t.Errorf("unnecessary grow")
+ }
+ a = appendOne_ssa(a, 8)
+ expect(t, a, []int{1, 2, 3, 4, 5, 6, 7, 8})
+ if &a[0] == &store[0] {
+ t.Errorf("didn't grow")
+ }
+}
+
+func TestAppend(t *testing.T) {
+ testAppend(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/arithBoundary_test.go b/src/cmd/compile/internal/test/testdata/arithBoundary_test.go
new file mode 100644
index 0000000..777b7cd
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/arithBoundary_test.go
@@ -0,0 +1,694 @@
+// Code generated by gen/arithBoundaryGen.go. DO NOT EDIT.
+
+package main
+
+import "testing"
+
+type utd64 struct {
+ a, b uint64
+ add, sub, mul, div, mod uint64
+}
+type itd64 struct {
+ a, b int64
+ add, sub, mul, div, mod int64
+}
+type utd32 struct {
+ a, b uint32
+ add, sub, mul, div, mod uint32
+}
+type itd32 struct {
+ a, b int32
+ add, sub, mul, div, mod int32
+}
+type utd16 struct {
+ a, b uint16
+ add, sub, mul, div, mod uint16
+}
+type itd16 struct {
+ a, b int16
+ add, sub, mul, div, mod int16
+}
+type utd8 struct {
+ a, b uint8
+ add, sub, mul, div, mod uint8
+}
+type itd8 struct {
+ a, b int8
+ add, sub, mul, div, mod int8
+}
+
+//go:noinline
+func add_uint64_ssa(a, b uint64) uint64 {
+ return a + b
+}
+
+//go:noinline
+func sub_uint64_ssa(a, b uint64) uint64 {
+ return a - b
+}
+
+//go:noinline
+func div_uint64_ssa(a, b uint64) uint64 {
+ return a / b
+}
+
+//go:noinline
+func mod_uint64_ssa(a, b uint64) uint64 {
+ return a % b
+}
+
+//go:noinline
+func mul_uint64_ssa(a, b uint64) uint64 {
+ return a * b
+}
+
+//go:noinline
+func add_int64_ssa(a, b int64) int64 {
+ return a + b
+}
+
+//go:noinline
+func sub_int64_ssa(a, b int64) int64 {
+ return a - b
+}
+
+//go:noinline
+func div_int64_ssa(a, b int64) int64 {
+ return a / b
+}
+
+//go:noinline
+func mod_int64_ssa(a, b int64) int64 {
+ return a % b
+}
+
+//go:noinline
+func mul_int64_ssa(a, b int64) int64 {
+ return a * b
+}
+
+//go:noinline
+func add_uint32_ssa(a, b uint32) uint32 {
+ return a + b
+}
+
+//go:noinline
+func sub_uint32_ssa(a, b uint32) uint32 {
+ return a - b
+}
+
+//go:noinline
+func div_uint32_ssa(a, b uint32) uint32 {
+ return a / b
+}
+
+//go:noinline
+func mod_uint32_ssa(a, b uint32) uint32 {
+ return a % b
+}
+
+//go:noinline
+func mul_uint32_ssa(a, b uint32) uint32 {
+ return a * b
+}
+
+//go:noinline
+func add_int32_ssa(a, b int32) int32 {
+ return a + b
+}
+
+//go:noinline
+func sub_int32_ssa(a, b int32) int32 {
+ return a - b
+}
+
+//go:noinline
+func div_int32_ssa(a, b int32) int32 {
+ return a / b
+}
+
+//go:noinline
+func mod_int32_ssa(a, b int32) int32 {
+ return a % b
+}
+
+//go:noinline
+func mul_int32_ssa(a, b int32) int32 {
+ return a * b
+}
+
+//go:noinline
+func add_uint16_ssa(a, b uint16) uint16 {
+ return a + b
+}
+
+//go:noinline
+func sub_uint16_ssa(a, b uint16) uint16 {
+ return a - b
+}
+
+//go:noinline
+func div_uint16_ssa(a, b uint16) uint16 {
+ return a / b
+}
+
+//go:noinline
+func mod_uint16_ssa(a, b uint16) uint16 {
+ return a % b
+}
+
+//go:noinline
+func mul_uint16_ssa(a, b uint16) uint16 {
+ return a * b
+}
+
+//go:noinline
+func add_int16_ssa(a, b int16) int16 {
+ return a + b
+}
+
+//go:noinline
+func sub_int16_ssa(a, b int16) int16 {
+ return a - b
+}
+
+//go:noinline
+func div_int16_ssa(a, b int16) int16 {
+ return a / b
+}
+
+//go:noinline
+func mod_int16_ssa(a, b int16) int16 {
+ return a % b
+}
+
+//go:noinline
+func mul_int16_ssa(a, b int16) int16 {
+ return a * b
+}
+
+//go:noinline
+func add_uint8_ssa(a, b uint8) uint8 {
+ return a + b
+}
+
+//go:noinline
+func sub_uint8_ssa(a, b uint8) uint8 {
+ return a - b
+}
+
+//go:noinline
+func div_uint8_ssa(a, b uint8) uint8 {
+ return a / b
+}
+
+//go:noinline
+func mod_uint8_ssa(a, b uint8) uint8 {
+ return a % b
+}
+
+//go:noinline
+func mul_uint8_ssa(a, b uint8) uint8 {
+ return a * b
+}
+
+//go:noinline
+func add_int8_ssa(a, b int8) int8 {
+ return a + b
+}
+
+//go:noinline
+func sub_int8_ssa(a, b int8) int8 {
+ return a - b
+}
+
+//go:noinline
+func div_int8_ssa(a, b int8) int8 {
+ return a / b
+}
+
+//go:noinline
+func mod_int8_ssa(a, b int8) int8 {
+ return a % b
+}
+
+//go:noinline
+func mul_int8_ssa(a, b int8) int8 {
+ return a * b
+}
+
+var uint64_data []utd64 = []utd64{utd64{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ utd64{a: 0, b: 1, add: 1, sub: 18446744073709551615, mul: 0, div: 0, mod: 0},
+ utd64{a: 0, b: 4294967296, add: 4294967296, sub: 18446744069414584320, mul: 0, div: 0, mod: 0},
+ utd64{a: 0, b: 18446744073709551615, add: 18446744073709551615, sub: 1, mul: 0, div: 0, mod: 0},
+ utd64{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ utd64{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ utd64{a: 1, b: 4294967296, add: 4294967297, sub: 18446744069414584321, mul: 4294967296, div: 0, mod: 1},
+ utd64{a: 1, b: 18446744073709551615, add: 0, sub: 2, mul: 18446744073709551615, div: 0, mod: 1},
+ utd64{a: 4294967296, b: 0, add: 4294967296, sub: 4294967296, mul: 0},
+ utd64{a: 4294967296, b: 1, add: 4294967297, sub: 4294967295, mul: 4294967296, div: 4294967296, mod: 0},
+ utd64{a: 4294967296, b: 4294967296, add: 8589934592, sub: 0, mul: 0, div: 1, mod: 0},
+ utd64{a: 4294967296, b: 18446744073709551615, add: 4294967295, sub: 4294967297, mul: 18446744069414584320, div: 0, mod: 4294967296},
+ utd64{a: 18446744073709551615, b: 0, add: 18446744073709551615, sub: 18446744073709551615, mul: 0},
+ utd64{a: 18446744073709551615, b: 1, add: 0, sub: 18446744073709551614, mul: 18446744073709551615, div: 18446744073709551615, mod: 0},
+ utd64{a: 18446744073709551615, b: 4294967296, add: 4294967295, sub: 18446744069414584319, mul: 18446744069414584320, div: 4294967295, mod: 4294967295},
+ utd64{a: 18446744073709551615, b: 18446744073709551615, add: 18446744073709551614, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var int64_data []itd64 = []itd64{itd64{a: -9223372036854775808, b: -9223372036854775808, add: 0, sub: 0, mul: 0, div: 1, mod: 0},
+ itd64{a: -9223372036854775808, b: -9223372036854775807, add: 1, sub: -1, mul: -9223372036854775808, div: 1, mod: -1},
+ itd64{a: -9223372036854775808, b: -4294967296, add: 9223372032559808512, sub: -9223372032559808512, mul: 0, div: 2147483648, mod: 0},
+ itd64{a: -9223372036854775808, b: -1, add: 9223372036854775807, sub: -9223372036854775807, mul: -9223372036854775808, div: -9223372036854775808, mod: 0},
+ itd64{a: -9223372036854775808, b: 0, add: -9223372036854775808, sub: -9223372036854775808, mul: 0},
+ itd64{a: -9223372036854775808, b: 1, add: -9223372036854775807, sub: 9223372036854775807, mul: -9223372036854775808, div: -9223372036854775808, mod: 0},
+ itd64{a: -9223372036854775808, b: 4294967296, add: -9223372032559808512, sub: 9223372032559808512, mul: 0, div: -2147483648, mod: 0},
+ itd64{a: -9223372036854775808, b: 9223372036854775806, add: -2, sub: 2, mul: 0, div: -1, mod: -2},
+ itd64{a: -9223372036854775808, b: 9223372036854775807, add: -1, sub: 1, mul: -9223372036854775808, div: -1, mod: -1},
+ itd64{a: -9223372036854775807, b: -9223372036854775808, add: 1, sub: 1, mul: -9223372036854775808, div: 0, mod: -9223372036854775807},
+ itd64{a: -9223372036854775807, b: -9223372036854775807, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd64{a: -9223372036854775807, b: -4294967296, add: 9223372032559808513, sub: -9223372032559808511, mul: -4294967296, div: 2147483647, mod: -4294967295},
+ itd64{a: -9223372036854775807, b: -1, add: -9223372036854775808, sub: -9223372036854775806, mul: 9223372036854775807, div: 9223372036854775807, mod: 0},
+ itd64{a: -9223372036854775807, b: 0, add: -9223372036854775807, sub: -9223372036854775807, mul: 0},
+ itd64{a: -9223372036854775807, b: 1, add: -9223372036854775806, sub: -9223372036854775808, mul: -9223372036854775807, div: -9223372036854775807, mod: 0},
+ itd64{a: -9223372036854775807, b: 4294967296, add: -9223372032559808511, sub: 9223372032559808513, mul: 4294967296, div: -2147483647, mod: -4294967295},
+ itd64{a: -9223372036854775807, b: 9223372036854775806, add: -1, sub: 3, mul: 9223372036854775806, div: -1, mod: -1},
+ itd64{a: -9223372036854775807, b: 9223372036854775807, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd64{a: -4294967296, b: -9223372036854775808, add: 9223372032559808512, sub: 9223372032559808512, mul: 0, div: 0, mod: -4294967296},
+ itd64{a: -4294967296, b: -9223372036854775807, add: 9223372032559808513, sub: 9223372032559808511, mul: -4294967296, div: 0, mod: -4294967296},
+ itd64{a: -4294967296, b: -4294967296, add: -8589934592, sub: 0, mul: 0, div: 1, mod: 0},
+ itd64{a: -4294967296, b: -1, add: -4294967297, sub: -4294967295, mul: 4294967296, div: 4294967296, mod: 0},
+ itd64{a: -4294967296, b: 0, add: -4294967296, sub: -4294967296, mul: 0},
+ itd64{a: -4294967296, b: 1, add: -4294967295, sub: -4294967297, mul: -4294967296, div: -4294967296, mod: 0},
+ itd64{a: -4294967296, b: 4294967296, add: 0, sub: -8589934592, mul: 0, div: -1, mod: 0},
+ itd64{a: -4294967296, b: 9223372036854775806, add: 9223372032559808510, sub: 9223372032559808514, mul: 8589934592, div: 0, mod: -4294967296},
+ itd64{a: -4294967296, b: 9223372036854775807, add: 9223372032559808511, sub: 9223372032559808513, mul: 4294967296, div: 0, mod: -4294967296},
+ itd64{a: -1, b: -9223372036854775808, add: 9223372036854775807, sub: 9223372036854775807, mul: -9223372036854775808, div: 0, mod: -1},
+ itd64{a: -1, b: -9223372036854775807, add: -9223372036854775808, sub: 9223372036854775806, mul: 9223372036854775807, div: 0, mod: -1},
+ itd64{a: -1, b: -4294967296, add: -4294967297, sub: 4294967295, mul: 4294967296, div: 0, mod: -1},
+ itd64{a: -1, b: -1, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd64{a: -1, b: 0, add: -1, sub: -1, mul: 0},
+ itd64{a: -1, b: 1, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd64{a: -1, b: 4294967296, add: 4294967295, sub: -4294967297, mul: -4294967296, div: 0, mod: -1},
+ itd64{a: -1, b: 9223372036854775806, add: 9223372036854775805, sub: -9223372036854775807, mul: -9223372036854775806, div: 0, mod: -1},
+ itd64{a: -1, b: 9223372036854775807, add: 9223372036854775806, sub: -9223372036854775808, mul: -9223372036854775807, div: 0, mod: -1},
+ itd64{a: 0, b: -9223372036854775808, add: -9223372036854775808, sub: -9223372036854775808, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: -9223372036854775807, add: -9223372036854775807, sub: 9223372036854775807, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: -4294967296, add: -4294967296, sub: 4294967296, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: -1, add: -1, sub: 1, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ itd64{a: 0, b: 1, add: 1, sub: -1, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: 4294967296, add: 4294967296, sub: -4294967296, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: 9223372036854775806, add: 9223372036854775806, sub: -9223372036854775806, mul: 0, div: 0, mod: 0},
+ itd64{a: 0, b: 9223372036854775807, add: 9223372036854775807, sub: -9223372036854775807, mul: 0, div: 0, mod: 0},
+ itd64{a: 1, b: -9223372036854775808, add: -9223372036854775807, sub: -9223372036854775807, mul: -9223372036854775808, div: 0, mod: 1},
+ itd64{a: 1, b: -9223372036854775807, add: -9223372036854775806, sub: -9223372036854775808, mul: -9223372036854775807, div: 0, mod: 1},
+ itd64{a: 1, b: -4294967296, add: -4294967295, sub: 4294967297, mul: -4294967296, div: 0, mod: 1},
+ itd64{a: 1, b: -1, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd64{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ itd64{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd64{a: 1, b: 4294967296, add: 4294967297, sub: -4294967295, mul: 4294967296, div: 0, mod: 1},
+ itd64{a: 1, b: 9223372036854775806, add: 9223372036854775807, sub: -9223372036854775805, mul: 9223372036854775806, div: 0, mod: 1},
+ itd64{a: 1, b: 9223372036854775807, add: -9223372036854775808, sub: -9223372036854775806, mul: 9223372036854775807, div: 0, mod: 1},
+ itd64{a: 4294967296, b: -9223372036854775808, add: -9223372032559808512, sub: -9223372032559808512, mul: 0, div: 0, mod: 4294967296},
+ itd64{a: 4294967296, b: -9223372036854775807, add: -9223372032559808511, sub: -9223372032559808513, mul: 4294967296, div: 0, mod: 4294967296},
+ itd64{a: 4294967296, b: -4294967296, add: 0, sub: 8589934592, mul: 0, div: -1, mod: 0},
+ itd64{a: 4294967296, b: -1, add: 4294967295, sub: 4294967297, mul: -4294967296, div: -4294967296, mod: 0},
+ itd64{a: 4294967296, b: 0, add: 4294967296, sub: 4294967296, mul: 0},
+ itd64{a: 4294967296, b: 1, add: 4294967297, sub: 4294967295, mul: 4294967296, div: 4294967296, mod: 0},
+ itd64{a: 4294967296, b: 4294967296, add: 8589934592, sub: 0, mul: 0, div: 1, mod: 0},
+ itd64{a: 4294967296, b: 9223372036854775806, add: -9223372032559808514, sub: -9223372032559808510, mul: -8589934592, div: 0, mod: 4294967296},
+ itd64{a: 4294967296, b: 9223372036854775807, add: -9223372032559808513, sub: -9223372032559808511, mul: -4294967296, div: 0, mod: 4294967296},
+ itd64{a: 9223372036854775806, b: -9223372036854775808, add: -2, sub: -2, mul: 0, div: 0, mod: 9223372036854775806},
+ itd64{a: 9223372036854775806, b: -9223372036854775807, add: -1, sub: -3, mul: 9223372036854775806, div: 0, mod: 9223372036854775806},
+ itd64{a: 9223372036854775806, b: -4294967296, add: 9223372032559808510, sub: -9223372032559808514, mul: 8589934592, div: -2147483647, mod: 4294967294},
+ itd64{a: 9223372036854775806, b: -1, add: 9223372036854775805, sub: 9223372036854775807, mul: -9223372036854775806, div: -9223372036854775806, mod: 0},
+ itd64{a: 9223372036854775806, b: 0, add: 9223372036854775806, sub: 9223372036854775806, mul: 0},
+ itd64{a: 9223372036854775806, b: 1, add: 9223372036854775807, sub: 9223372036854775805, mul: 9223372036854775806, div: 9223372036854775806, mod: 0},
+ itd64{a: 9223372036854775806, b: 4294967296, add: -9223372032559808514, sub: 9223372032559808510, mul: -8589934592, div: 2147483647, mod: 4294967294},
+ itd64{a: 9223372036854775806, b: 9223372036854775806, add: -4, sub: 0, mul: 4, div: 1, mod: 0},
+ itd64{a: 9223372036854775806, b: 9223372036854775807, add: -3, sub: -1, mul: -9223372036854775806, div: 0, mod: 9223372036854775806},
+ itd64{a: 9223372036854775807, b: -9223372036854775808, add: -1, sub: -1, mul: -9223372036854775808, div: 0, mod: 9223372036854775807},
+ itd64{a: 9223372036854775807, b: -9223372036854775807, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd64{a: 9223372036854775807, b: -4294967296, add: 9223372032559808511, sub: -9223372032559808513, mul: 4294967296, div: -2147483647, mod: 4294967295},
+ itd64{a: 9223372036854775807, b: -1, add: 9223372036854775806, sub: -9223372036854775808, mul: -9223372036854775807, div: -9223372036854775807, mod: 0},
+ itd64{a: 9223372036854775807, b: 0, add: 9223372036854775807, sub: 9223372036854775807, mul: 0},
+ itd64{a: 9223372036854775807, b: 1, add: -9223372036854775808, sub: 9223372036854775806, mul: 9223372036854775807, div: 9223372036854775807, mod: 0},
+ itd64{a: 9223372036854775807, b: 4294967296, add: -9223372032559808513, sub: 9223372032559808511, mul: -4294967296, div: 2147483647, mod: 4294967295},
+ itd64{a: 9223372036854775807, b: 9223372036854775806, add: -3, sub: 1, mul: -9223372036854775806, div: 1, mod: 1},
+ itd64{a: 9223372036854775807, b: 9223372036854775807, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var uint32_data []utd32 = []utd32{utd32{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ utd32{a: 0, b: 1, add: 1, sub: 4294967295, mul: 0, div: 0, mod: 0},
+ utd32{a: 0, b: 4294967295, add: 4294967295, sub: 1, mul: 0, div: 0, mod: 0},
+ utd32{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ utd32{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ utd32{a: 1, b: 4294967295, add: 0, sub: 2, mul: 4294967295, div: 0, mod: 1},
+ utd32{a: 4294967295, b: 0, add: 4294967295, sub: 4294967295, mul: 0},
+ utd32{a: 4294967295, b: 1, add: 0, sub: 4294967294, mul: 4294967295, div: 4294967295, mod: 0},
+ utd32{a: 4294967295, b: 4294967295, add: 4294967294, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var int32_data []itd32 = []itd32{itd32{a: -2147483648, b: -2147483648, add: 0, sub: 0, mul: 0, div: 1, mod: 0},
+ itd32{a: -2147483648, b: -2147483647, add: 1, sub: -1, mul: -2147483648, div: 1, mod: -1},
+ itd32{a: -2147483648, b: -1, add: 2147483647, sub: -2147483647, mul: -2147483648, div: -2147483648, mod: 0},
+ itd32{a: -2147483648, b: 0, add: -2147483648, sub: -2147483648, mul: 0},
+ itd32{a: -2147483648, b: 1, add: -2147483647, sub: 2147483647, mul: -2147483648, div: -2147483648, mod: 0},
+ itd32{a: -2147483648, b: 2147483647, add: -1, sub: 1, mul: -2147483648, div: -1, mod: -1},
+ itd32{a: -2147483647, b: -2147483648, add: 1, sub: 1, mul: -2147483648, div: 0, mod: -2147483647},
+ itd32{a: -2147483647, b: -2147483647, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd32{a: -2147483647, b: -1, add: -2147483648, sub: -2147483646, mul: 2147483647, div: 2147483647, mod: 0},
+ itd32{a: -2147483647, b: 0, add: -2147483647, sub: -2147483647, mul: 0},
+ itd32{a: -2147483647, b: 1, add: -2147483646, sub: -2147483648, mul: -2147483647, div: -2147483647, mod: 0},
+ itd32{a: -2147483647, b: 2147483647, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd32{a: -1, b: -2147483648, add: 2147483647, sub: 2147483647, mul: -2147483648, div: 0, mod: -1},
+ itd32{a: -1, b: -2147483647, add: -2147483648, sub: 2147483646, mul: 2147483647, div: 0, mod: -1},
+ itd32{a: -1, b: -1, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd32{a: -1, b: 0, add: -1, sub: -1, mul: 0},
+ itd32{a: -1, b: 1, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd32{a: -1, b: 2147483647, add: 2147483646, sub: -2147483648, mul: -2147483647, div: 0, mod: -1},
+ itd32{a: 0, b: -2147483648, add: -2147483648, sub: -2147483648, mul: 0, div: 0, mod: 0},
+ itd32{a: 0, b: -2147483647, add: -2147483647, sub: 2147483647, mul: 0, div: 0, mod: 0},
+ itd32{a: 0, b: -1, add: -1, sub: 1, mul: 0, div: 0, mod: 0},
+ itd32{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ itd32{a: 0, b: 1, add: 1, sub: -1, mul: 0, div: 0, mod: 0},
+ itd32{a: 0, b: 2147483647, add: 2147483647, sub: -2147483647, mul: 0, div: 0, mod: 0},
+ itd32{a: 1, b: -2147483648, add: -2147483647, sub: -2147483647, mul: -2147483648, div: 0, mod: 1},
+ itd32{a: 1, b: -2147483647, add: -2147483646, sub: -2147483648, mul: -2147483647, div: 0, mod: 1},
+ itd32{a: 1, b: -1, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd32{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ itd32{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd32{a: 1, b: 2147483647, add: -2147483648, sub: -2147483646, mul: 2147483647, div: 0, mod: 1},
+ itd32{a: 2147483647, b: -2147483648, add: -1, sub: -1, mul: -2147483648, div: 0, mod: 2147483647},
+ itd32{a: 2147483647, b: -2147483647, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd32{a: 2147483647, b: -1, add: 2147483646, sub: -2147483648, mul: -2147483647, div: -2147483647, mod: 0},
+ itd32{a: 2147483647, b: 0, add: 2147483647, sub: 2147483647, mul: 0},
+ itd32{a: 2147483647, b: 1, add: -2147483648, sub: 2147483646, mul: 2147483647, div: 2147483647, mod: 0},
+ itd32{a: 2147483647, b: 2147483647, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var uint16_data []utd16 = []utd16{utd16{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ utd16{a: 0, b: 1, add: 1, sub: 65535, mul: 0, div: 0, mod: 0},
+ utd16{a: 0, b: 65535, add: 65535, sub: 1, mul: 0, div: 0, mod: 0},
+ utd16{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ utd16{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ utd16{a: 1, b: 65535, add: 0, sub: 2, mul: 65535, div: 0, mod: 1},
+ utd16{a: 65535, b: 0, add: 65535, sub: 65535, mul: 0},
+ utd16{a: 65535, b: 1, add: 0, sub: 65534, mul: 65535, div: 65535, mod: 0},
+ utd16{a: 65535, b: 65535, add: 65534, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var int16_data []itd16 = []itd16{itd16{a: -32768, b: -32768, add: 0, sub: 0, mul: 0, div: 1, mod: 0},
+ itd16{a: -32768, b: -32767, add: 1, sub: -1, mul: -32768, div: 1, mod: -1},
+ itd16{a: -32768, b: -1, add: 32767, sub: -32767, mul: -32768, div: -32768, mod: 0},
+ itd16{a: -32768, b: 0, add: -32768, sub: -32768, mul: 0},
+ itd16{a: -32768, b: 1, add: -32767, sub: 32767, mul: -32768, div: -32768, mod: 0},
+ itd16{a: -32768, b: 32766, add: -2, sub: 2, mul: 0, div: -1, mod: -2},
+ itd16{a: -32768, b: 32767, add: -1, sub: 1, mul: -32768, div: -1, mod: -1},
+ itd16{a: -32767, b: -32768, add: 1, sub: 1, mul: -32768, div: 0, mod: -32767},
+ itd16{a: -32767, b: -32767, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd16{a: -32767, b: -1, add: -32768, sub: -32766, mul: 32767, div: 32767, mod: 0},
+ itd16{a: -32767, b: 0, add: -32767, sub: -32767, mul: 0},
+ itd16{a: -32767, b: 1, add: -32766, sub: -32768, mul: -32767, div: -32767, mod: 0},
+ itd16{a: -32767, b: 32766, add: -1, sub: 3, mul: 32766, div: -1, mod: -1},
+ itd16{a: -32767, b: 32767, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd16{a: -1, b: -32768, add: 32767, sub: 32767, mul: -32768, div: 0, mod: -1},
+ itd16{a: -1, b: -32767, add: -32768, sub: 32766, mul: 32767, div: 0, mod: -1},
+ itd16{a: -1, b: -1, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd16{a: -1, b: 0, add: -1, sub: -1, mul: 0},
+ itd16{a: -1, b: 1, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd16{a: -1, b: 32766, add: 32765, sub: -32767, mul: -32766, div: 0, mod: -1},
+ itd16{a: -1, b: 32767, add: 32766, sub: -32768, mul: -32767, div: 0, mod: -1},
+ itd16{a: 0, b: -32768, add: -32768, sub: -32768, mul: 0, div: 0, mod: 0},
+ itd16{a: 0, b: -32767, add: -32767, sub: 32767, mul: 0, div: 0, mod: 0},
+ itd16{a: 0, b: -1, add: -1, sub: 1, mul: 0, div: 0, mod: 0},
+ itd16{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ itd16{a: 0, b: 1, add: 1, sub: -1, mul: 0, div: 0, mod: 0},
+ itd16{a: 0, b: 32766, add: 32766, sub: -32766, mul: 0, div: 0, mod: 0},
+ itd16{a: 0, b: 32767, add: 32767, sub: -32767, mul: 0, div: 0, mod: 0},
+ itd16{a: 1, b: -32768, add: -32767, sub: -32767, mul: -32768, div: 0, mod: 1},
+ itd16{a: 1, b: -32767, add: -32766, sub: -32768, mul: -32767, div: 0, mod: 1},
+ itd16{a: 1, b: -1, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd16{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ itd16{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd16{a: 1, b: 32766, add: 32767, sub: -32765, mul: 32766, div: 0, mod: 1},
+ itd16{a: 1, b: 32767, add: -32768, sub: -32766, mul: 32767, div: 0, mod: 1},
+ itd16{a: 32766, b: -32768, add: -2, sub: -2, mul: 0, div: 0, mod: 32766},
+ itd16{a: 32766, b: -32767, add: -1, sub: -3, mul: 32766, div: 0, mod: 32766},
+ itd16{a: 32766, b: -1, add: 32765, sub: 32767, mul: -32766, div: -32766, mod: 0},
+ itd16{a: 32766, b: 0, add: 32766, sub: 32766, mul: 0},
+ itd16{a: 32766, b: 1, add: 32767, sub: 32765, mul: 32766, div: 32766, mod: 0},
+ itd16{a: 32766, b: 32766, add: -4, sub: 0, mul: 4, div: 1, mod: 0},
+ itd16{a: 32766, b: 32767, add: -3, sub: -1, mul: -32766, div: 0, mod: 32766},
+ itd16{a: 32767, b: -32768, add: -1, sub: -1, mul: -32768, div: 0, mod: 32767},
+ itd16{a: 32767, b: -32767, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd16{a: 32767, b: -1, add: 32766, sub: -32768, mul: -32767, div: -32767, mod: 0},
+ itd16{a: 32767, b: 0, add: 32767, sub: 32767, mul: 0},
+ itd16{a: 32767, b: 1, add: -32768, sub: 32766, mul: 32767, div: 32767, mod: 0},
+ itd16{a: 32767, b: 32766, add: -3, sub: 1, mul: -32766, div: 1, mod: 1},
+ itd16{a: 32767, b: 32767, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var uint8_data []utd8 = []utd8{utd8{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ utd8{a: 0, b: 1, add: 1, sub: 255, mul: 0, div: 0, mod: 0},
+ utd8{a: 0, b: 255, add: 255, sub: 1, mul: 0, div: 0, mod: 0},
+ utd8{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ utd8{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ utd8{a: 1, b: 255, add: 0, sub: 2, mul: 255, div: 0, mod: 1},
+ utd8{a: 255, b: 0, add: 255, sub: 255, mul: 0},
+ utd8{a: 255, b: 1, add: 0, sub: 254, mul: 255, div: 255, mod: 0},
+ utd8{a: 255, b: 255, add: 254, sub: 0, mul: 1, div: 1, mod: 0},
+}
+var int8_data []itd8 = []itd8{itd8{a: -128, b: -128, add: 0, sub: 0, mul: 0, div: 1, mod: 0},
+ itd8{a: -128, b: -127, add: 1, sub: -1, mul: -128, div: 1, mod: -1},
+ itd8{a: -128, b: -1, add: 127, sub: -127, mul: -128, div: -128, mod: 0},
+ itd8{a: -128, b: 0, add: -128, sub: -128, mul: 0},
+ itd8{a: -128, b: 1, add: -127, sub: 127, mul: -128, div: -128, mod: 0},
+ itd8{a: -128, b: 126, add: -2, sub: 2, mul: 0, div: -1, mod: -2},
+ itd8{a: -128, b: 127, add: -1, sub: 1, mul: -128, div: -1, mod: -1},
+ itd8{a: -127, b: -128, add: 1, sub: 1, mul: -128, div: 0, mod: -127},
+ itd8{a: -127, b: -127, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd8{a: -127, b: -1, add: -128, sub: -126, mul: 127, div: 127, mod: 0},
+ itd8{a: -127, b: 0, add: -127, sub: -127, mul: 0},
+ itd8{a: -127, b: 1, add: -126, sub: -128, mul: -127, div: -127, mod: 0},
+ itd8{a: -127, b: 126, add: -1, sub: 3, mul: 126, div: -1, mod: -1},
+ itd8{a: -127, b: 127, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd8{a: -1, b: -128, add: 127, sub: 127, mul: -128, div: 0, mod: -1},
+ itd8{a: -1, b: -127, add: -128, sub: 126, mul: 127, div: 0, mod: -1},
+ itd8{a: -1, b: -1, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd8{a: -1, b: 0, add: -1, sub: -1, mul: 0},
+ itd8{a: -1, b: 1, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd8{a: -1, b: 126, add: 125, sub: -127, mul: -126, div: 0, mod: -1},
+ itd8{a: -1, b: 127, add: 126, sub: -128, mul: -127, div: 0, mod: -1},
+ itd8{a: 0, b: -128, add: -128, sub: -128, mul: 0, div: 0, mod: 0},
+ itd8{a: 0, b: -127, add: -127, sub: 127, mul: 0, div: 0, mod: 0},
+ itd8{a: 0, b: -1, add: -1, sub: 1, mul: 0, div: 0, mod: 0},
+ itd8{a: 0, b: 0, add: 0, sub: 0, mul: 0},
+ itd8{a: 0, b: 1, add: 1, sub: -1, mul: 0, div: 0, mod: 0},
+ itd8{a: 0, b: 126, add: 126, sub: -126, mul: 0, div: 0, mod: 0},
+ itd8{a: 0, b: 127, add: 127, sub: -127, mul: 0, div: 0, mod: 0},
+ itd8{a: 1, b: -128, add: -127, sub: -127, mul: -128, div: 0, mod: 1},
+ itd8{a: 1, b: -127, add: -126, sub: -128, mul: -127, div: 0, mod: 1},
+ itd8{a: 1, b: -1, add: 0, sub: 2, mul: -1, div: -1, mod: 0},
+ itd8{a: 1, b: 0, add: 1, sub: 1, mul: 0},
+ itd8{a: 1, b: 1, add: 2, sub: 0, mul: 1, div: 1, mod: 0},
+ itd8{a: 1, b: 126, add: 127, sub: -125, mul: 126, div: 0, mod: 1},
+ itd8{a: 1, b: 127, add: -128, sub: -126, mul: 127, div: 0, mod: 1},
+ itd8{a: 126, b: -128, add: -2, sub: -2, mul: 0, div: 0, mod: 126},
+ itd8{a: 126, b: -127, add: -1, sub: -3, mul: 126, div: 0, mod: 126},
+ itd8{a: 126, b: -1, add: 125, sub: 127, mul: -126, div: -126, mod: 0},
+ itd8{a: 126, b: 0, add: 126, sub: 126, mul: 0},
+ itd8{a: 126, b: 1, add: 127, sub: 125, mul: 126, div: 126, mod: 0},
+ itd8{a: 126, b: 126, add: -4, sub: 0, mul: 4, div: 1, mod: 0},
+ itd8{a: 126, b: 127, add: -3, sub: -1, mul: -126, div: 0, mod: 126},
+ itd8{a: 127, b: -128, add: -1, sub: -1, mul: -128, div: 0, mod: 127},
+ itd8{a: 127, b: -127, add: 0, sub: -2, mul: -1, div: -1, mod: 0},
+ itd8{a: 127, b: -1, add: 126, sub: -128, mul: -127, div: -127, mod: 0},
+ itd8{a: 127, b: 0, add: 127, sub: 127, mul: 0},
+ itd8{a: 127, b: 1, add: -128, sub: 126, mul: 127, div: 127, mod: 0},
+ itd8{a: 127, b: 126, add: -3, sub: 1, mul: -126, div: 1, mod: 1},
+ itd8{a: 127, b: 127, add: -2, sub: 0, mul: 1, div: 1, mod: 0},
+}
+
+//TestArithmeticBoundary tests boundary results for arithmetic operations.
+func TestArithmeticBoundary(t *testing.T) {
+
+ for _, v := range uint64_data {
+ if got := add_uint64_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_uint64 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_uint64_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_uint64 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_uint64_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_uint64 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_uint64_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_uint64 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_uint64_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_uint64 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range int64_data {
+ if got := add_int64_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_int64 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_int64_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_int64 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_int64_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_int64 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_int64_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_int64 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_int64_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_int64 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range uint32_data {
+ if got := add_uint32_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_uint32 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_uint32_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_uint32 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_uint32_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_uint32 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_uint32_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_uint32 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_uint32_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_uint32 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range int32_data {
+ if got := add_int32_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_int32 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_int32_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_int32 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_int32_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_int32 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_int32_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_int32 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_int32_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_int32 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range uint16_data {
+ if got := add_uint16_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_uint16 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_uint16_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_uint16 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_uint16_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_uint16 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_uint16_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_uint16 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_uint16_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_uint16 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range int16_data {
+ if got := add_int16_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_int16 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_int16_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_int16 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_int16_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_int16 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_int16_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_int16 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_int16_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_int16 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range uint8_data {
+ if got := add_uint8_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_uint8 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_uint8_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_uint8 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_uint8_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_uint8 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_uint8_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_uint8 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_uint8_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_uint8 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+ for _, v := range int8_data {
+ if got := add_int8_ssa(v.a, v.b); got != v.add {
+ t.Errorf("add_int8 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add)
+ }
+ if got := sub_int8_ssa(v.a, v.b); got != v.sub {
+ t.Errorf("sub_int8 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub)
+ }
+ if v.b != 0 {
+ if got := div_int8_ssa(v.a, v.b); got != v.div {
+ t.Errorf("div_int8 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div)
+ }
+
+ }
+ if v.b != 0 {
+ if got := mod_int8_ssa(v.a, v.b); got != v.mod {
+ t.Errorf("mod_int8 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod)
+ }
+
+ }
+ if got := mul_int8_ssa(v.a, v.b); got != v.mul {
+ t.Errorf("mul_int8 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/arithConst_test.go b/src/cmd/compile/internal/test/testdata/arithConst_test.go
new file mode 100644
index 0000000..9f5ac61
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/arithConst_test.go
@@ -0,0 +1,9570 @@
+// Code generated by gen/arithConstGen.go. DO NOT EDIT.
+
+package main
+
+import "testing"
+
+//go:noinline
+func add_uint64_0(a uint64) uint64 { return a + 0 }
+
+//go:noinline
+func add_0_uint64(a uint64) uint64 { return 0 + a }
+
+//go:noinline
+func add_uint64_1(a uint64) uint64 { return a + 1 }
+
+//go:noinline
+func add_1_uint64(a uint64) uint64 { return 1 + a }
+
+//go:noinline
+func add_uint64_4294967296(a uint64) uint64 { return a + 4294967296 }
+
+//go:noinline
+func add_4294967296_uint64(a uint64) uint64 { return 4294967296 + a }
+
+//go:noinline
+func add_uint64_9223372036854775808(a uint64) uint64 { return a + 9223372036854775808 }
+
+//go:noinline
+func add_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 + a }
+
+//go:noinline
+func add_uint64_18446744073709551615(a uint64) uint64 { return a + 18446744073709551615 }
+
+//go:noinline
+func add_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 + a }
+
+//go:noinline
+func sub_uint64_0(a uint64) uint64 { return a - 0 }
+
+//go:noinline
+func sub_0_uint64(a uint64) uint64 { return 0 - a }
+
+//go:noinline
+func sub_uint64_1(a uint64) uint64 { return a - 1 }
+
+//go:noinline
+func sub_1_uint64(a uint64) uint64 { return 1 - a }
+
+//go:noinline
+func sub_uint64_4294967296(a uint64) uint64 { return a - 4294967296 }
+
+//go:noinline
+func sub_4294967296_uint64(a uint64) uint64 { return 4294967296 - a }
+
+//go:noinline
+func sub_uint64_9223372036854775808(a uint64) uint64 { return a - 9223372036854775808 }
+
+//go:noinline
+func sub_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 - a }
+
+//go:noinline
+func sub_uint64_18446744073709551615(a uint64) uint64 { return a - 18446744073709551615 }
+
+//go:noinline
+func sub_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 - a }
+
+//go:noinline
+func div_0_uint64(a uint64) uint64 { return 0 / a }
+
+//go:noinline
+func div_uint64_1(a uint64) uint64 { return a / 1 }
+
+//go:noinline
+func div_1_uint64(a uint64) uint64 { return 1 / a }
+
+//go:noinline
+func div_uint64_4294967296(a uint64) uint64 { return a / 4294967296 }
+
+//go:noinline
+func div_4294967296_uint64(a uint64) uint64 { return 4294967296 / a }
+
+//go:noinline
+func div_uint64_9223372036854775808(a uint64) uint64 { return a / 9223372036854775808 }
+
+//go:noinline
+func div_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 / a }
+
+//go:noinline
+func div_uint64_18446744073709551615(a uint64) uint64 { return a / 18446744073709551615 }
+
+//go:noinline
+func div_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 / a }
+
+//go:noinline
+func mul_uint64_0(a uint64) uint64 { return a * 0 }
+
+//go:noinline
+func mul_0_uint64(a uint64) uint64 { return 0 * a }
+
+//go:noinline
+func mul_uint64_1(a uint64) uint64 { return a * 1 }
+
+//go:noinline
+func mul_1_uint64(a uint64) uint64 { return 1 * a }
+
+//go:noinline
+func mul_uint64_4294967296(a uint64) uint64 { return a * 4294967296 }
+
+//go:noinline
+func mul_4294967296_uint64(a uint64) uint64 { return 4294967296 * a }
+
+//go:noinline
+func mul_uint64_9223372036854775808(a uint64) uint64 { return a * 9223372036854775808 }
+
+//go:noinline
+func mul_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 * a }
+
+//go:noinline
+func mul_uint64_18446744073709551615(a uint64) uint64 { return a * 18446744073709551615 }
+
+//go:noinline
+func mul_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 * a }
+
+//go:noinline
+func lsh_uint64_0(a uint64) uint64 { return a << 0 }
+
+//go:noinline
+func lsh_0_uint64(a uint64) uint64 { return 0 << a }
+
+//go:noinline
+func lsh_uint64_1(a uint64) uint64 { return a << 1 }
+
+//go:noinline
+func lsh_1_uint64(a uint64) uint64 { return 1 << a }
+
+//go:noinline
+func lsh_uint64_4294967296(a uint64) uint64 { return a << uint64(4294967296) }
+
+//go:noinline
+func lsh_4294967296_uint64(a uint64) uint64 { return 4294967296 << a }
+
+//go:noinline
+func lsh_uint64_9223372036854775808(a uint64) uint64 { return a << uint64(9223372036854775808) }
+
+//go:noinline
+func lsh_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 << a }
+
+//go:noinline
+func lsh_uint64_18446744073709551615(a uint64) uint64 { return a << uint64(18446744073709551615) }
+
+//go:noinline
+func lsh_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 << a }
+
+//go:noinline
+func rsh_uint64_0(a uint64) uint64 { return a >> 0 }
+
+//go:noinline
+func rsh_0_uint64(a uint64) uint64 { return 0 >> a }
+
+//go:noinline
+func rsh_uint64_1(a uint64) uint64 { return a >> 1 }
+
+//go:noinline
+func rsh_1_uint64(a uint64) uint64 { return 1 >> a }
+
+//go:noinline
+func rsh_uint64_4294967296(a uint64) uint64 { return a >> uint64(4294967296) }
+
+//go:noinline
+func rsh_4294967296_uint64(a uint64) uint64 { return 4294967296 >> a }
+
+//go:noinline
+func rsh_uint64_9223372036854775808(a uint64) uint64 { return a >> uint64(9223372036854775808) }
+
+//go:noinline
+func rsh_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 >> a }
+
+//go:noinline
+func rsh_uint64_18446744073709551615(a uint64) uint64 { return a >> uint64(18446744073709551615) }
+
+//go:noinline
+func rsh_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 >> a }
+
+//go:noinline
+func mod_0_uint64(a uint64) uint64 { return 0 % a }
+
+//go:noinline
+func mod_uint64_1(a uint64) uint64 { return a % 1 }
+
+//go:noinline
+func mod_1_uint64(a uint64) uint64 { return 1 % a }
+
+//go:noinline
+func mod_uint64_4294967296(a uint64) uint64 { return a % 4294967296 }
+
+//go:noinline
+func mod_4294967296_uint64(a uint64) uint64 { return 4294967296 % a }
+
+//go:noinline
+func mod_uint64_9223372036854775808(a uint64) uint64 { return a % 9223372036854775808 }
+
+//go:noinline
+func mod_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 % a }
+
+//go:noinline
+func mod_uint64_18446744073709551615(a uint64) uint64 { return a % 18446744073709551615 }
+
+//go:noinline
+func mod_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 % a }
+
+//go:noinline
+func and_uint64_0(a uint64) uint64 { return a & 0 }
+
+//go:noinline
+func and_0_uint64(a uint64) uint64 { return 0 & a }
+
+//go:noinline
+func and_uint64_1(a uint64) uint64 { return a & 1 }
+
+//go:noinline
+func and_1_uint64(a uint64) uint64 { return 1 & a }
+
+//go:noinline
+func and_uint64_4294967296(a uint64) uint64 { return a & 4294967296 }
+
+//go:noinline
+func and_4294967296_uint64(a uint64) uint64 { return 4294967296 & a }
+
+//go:noinline
+func and_uint64_9223372036854775808(a uint64) uint64 { return a & 9223372036854775808 }
+
+//go:noinline
+func and_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 & a }
+
+//go:noinline
+func and_uint64_18446744073709551615(a uint64) uint64 { return a & 18446744073709551615 }
+
+//go:noinline
+func and_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 & a }
+
+//go:noinline
+func or_uint64_0(a uint64) uint64 { return a | 0 }
+
+//go:noinline
+func or_0_uint64(a uint64) uint64 { return 0 | a }
+
+//go:noinline
+func or_uint64_1(a uint64) uint64 { return a | 1 }
+
+//go:noinline
+func or_1_uint64(a uint64) uint64 { return 1 | a }
+
+//go:noinline
+func or_uint64_4294967296(a uint64) uint64 { return a | 4294967296 }
+
+//go:noinline
+func or_4294967296_uint64(a uint64) uint64 { return 4294967296 | a }
+
+//go:noinline
+func or_uint64_9223372036854775808(a uint64) uint64 { return a | 9223372036854775808 }
+
+//go:noinline
+func or_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 | a }
+
+//go:noinline
+func or_uint64_18446744073709551615(a uint64) uint64 { return a | 18446744073709551615 }
+
+//go:noinline
+func or_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 | a }
+
+//go:noinline
+func xor_uint64_0(a uint64) uint64 { return a ^ 0 }
+
+//go:noinline
+func xor_0_uint64(a uint64) uint64 { return 0 ^ a }
+
+//go:noinline
+func xor_uint64_1(a uint64) uint64 { return a ^ 1 }
+
+//go:noinline
+func xor_1_uint64(a uint64) uint64 { return 1 ^ a }
+
+//go:noinline
+func xor_uint64_4294967296(a uint64) uint64 { return a ^ 4294967296 }
+
+//go:noinline
+func xor_4294967296_uint64(a uint64) uint64 { return 4294967296 ^ a }
+
+//go:noinline
+func xor_uint64_9223372036854775808(a uint64) uint64 { return a ^ 9223372036854775808 }
+
+//go:noinline
+func xor_9223372036854775808_uint64(a uint64) uint64 { return 9223372036854775808 ^ a }
+
+//go:noinline
+func xor_uint64_18446744073709551615(a uint64) uint64 { return a ^ 18446744073709551615 }
+
+//go:noinline
+func xor_18446744073709551615_uint64(a uint64) uint64 { return 18446744073709551615 ^ a }
+
+//go:noinline
+func mul_uint64_3(a uint64) uint64 { return a * 3 }
+
+//go:noinline
+func mul_3_uint64(a uint64) uint64 { return 3 * a }
+
+//go:noinline
+func mul_uint64_5(a uint64) uint64 { return a * 5 }
+
+//go:noinline
+func mul_5_uint64(a uint64) uint64 { return 5 * a }
+
+//go:noinline
+func mul_uint64_7(a uint64) uint64 { return a * 7 }
+
+//go:noinline
+func mul_7_uint64(a uint64) uint64 { return 7 * a }
+
+//go:noinline
+func mul_uint64_9(a uint64) uint64 { return a * 9 }
+
+//go:noinline
+func mul_9_uint64(a uint64) uint64 { return 9 * a }
+
+//go:noinline
+func mul_uint64_10(a uint64) uint64 { return a * 10 }
+
+//go:noinline
+func mul_10_uint64(a uint64) uint64 { return 10 * a }
+
+//go:noinline
+func mul_uint64_11(a uint64) uint64 { return a * 11 }
+
+//go:noinline
+func mul_11_uint64(a uint64) uint64 { return 11 * a }
+
+//go:noinline
+func mul_uint64_13(a uint64) uint64 { return a * 13 }
+
+//go:noinline
+func mul_13_uint64(a uint64) uint64 { return 13 * a }
+
+//go:noinline
+func mul_uint64_19(a uint64) uint64 { return a * 19 }
+
+//go:noinline
+func mul_19_uint64(a uint64) uint64 { return 19 * a }
+
+//go:noinline
+func mul_uint64_21(a uint64) uint64 { return a * 21 }
+
+//go:noinline
+func mul_21_uint64(a uint64) uint64 { return 21 * a }
+
+//go:noinline
+func mul_uint64_25(a uint64) uint64 { return a * 25 }
+
+//go:noinline
+func mul_25_uint64(a uint64) uint64 { return 25 * a }
+
+//go:noinline
+func mul_uint64_27(a uint64) uint64 { return a * 27 }
+
+//go:noinline
+func mul_27_uint64(a uint64) uint64 { return 27 * a }
+
+//go:noinline
+func mul_uint64_37(a uint64) uint64 { return a * 37 }
+
+//go:noinline
+func mul_37_uint64(a uint64) uint64 { return 37 * a }
+
+//go:noinline
+func mul_uint64_41(a uint64) uint64 { return a * 41 }
+
+//go:noinline
+func mul_41_uint64(a uint64) uint64 { return 41 * a }
+
+//go:noinline
+func mul_uint64_45(a uint64) uint64 { return a * 45 }
+
+//go:noinline
+func mul_45_uint64(a uint64) uint64 { return 45 * a }
+
+//go:noinline
+func mul_uint64_73(a uint64) uint64 { return a * 73 }
+
+//go:noinline
+func mul_73_uint64(a uint64) uint64 { return 73 * a }
+
+//go:noinline
+func mul_uint64_81(a uint64) uint64 { return a * 81 }
+
+//go:noinline
+func mul_81_uint64(a uint64) uint64 { return 81 * a }
+
+//go:noinline
+func add_int64_Neg9223372036854775808(a int64) int64 { return a + -9223372036854775808 }
+
+//go:noinline
+func add_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 + a }
+
+//go:noinline
+func add_int64_Neg9223372036854775807(a int64) int64 { return a + -9223372036854775807 }
+
+//go:noinline
+func add_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 + a }
+
+//go:noinline
+func add_int64_Neg4294967296(a int64) int64 { return a + -4294967296 }
+
+//go:noinline
+func add_Neg4294967296_int64(a int64) int64 { return -4294967296 + a }
+
+//go:noinline
+func add_int64_Neg1(a int64) int64 { return a + -1 }
+
+//go:noinline
+func add_Neg1_int64(a int64) int64 { return -1 + a }
+
+//go:noinline
+func add_int64_0(a int64) int64 { return a + 0 }
+
+//go:noinline
+func add_0_int64(a int64) int64 { return 0 + a }
+
+//go:noinline
+func add_int64_1(a int64) int64 { return a + 1 }
+
+//go:noinline
+func add_1_int64(a int64) int64 { return 1 + a }
+
+//go:noinline
+func add_int64_4294967296(a int64) int64 { return a + 4294967296 }
+
+//go:noinline
+func add_4294967296_int64(a int64) int64 { return 4294967296 + a }
+
+//go:noinline
+func add_int64_9223372036854775806(a int64) int64 { return a + 9223372036854775806 }
+
+//go:noinline
+func add_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 + a }
+
+//go:noinline
+func add_int64_9223372036854775807(a int64) int64 { return a + 9223372036854775807 }
+
+//go:noinline
+func add_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 + a }
+
+//go:noinline
+func sub_int64_Neg9223372036854775808(a int64) int64 { return a - -9223372036854775808 }
+
+//go:noinline
+func sub_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 - a }
+
+//go:noinline
+func sub_int64_Neg9223372036854775807(a int64) int64 { return a - -9223372036854775807 }
+
+//go:noinline
+func sub_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 - a }
+
+//go:noinline
+func sub_int64_Neg4294967296(a int64) int64 { return a - -4294967296 }
+
+//go:noinline
+func sub_Neg4294967296_int64(a int64) int64 { return -4294967296 - a }
+
+//go:noinline
+func sub_int64_Neg1(a int64) int64 { return a - -1 }
+
+//go:noinline
+func sub_Neg1_int64(a int64) int64 { return -1 - a }
+
+//go:noinline
+func sub_int64_0(a int64) int64 { return a - 0 }
+
+//go:noinline
+func sub_0_int64(a int64) int64 { return 0 - a }
+
+//go:noinline
+func sub_int64_1(a int64) int64 { return a - 1 }
+
+//go:noinline
+func sub_1_int64(a int64) int64 { return 1 - a }
+
+//go:noinline
+func sub_int64_4294967296(a int64) int64 { return a - 4294967296 }
+
+//go:noinline
+func sub_4294967296_int64(a int64) int64 { return 4294967296 - a }
+
+//go:noinline
+func sub_int64_9223372036854775806(a int64) int64 { return a - 9223372036854775806 }
+
+//go:noinline
+func sub_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 - a }
+
+//go:noinline
+func sub_int64_9223372036854775807(a int64) int64 { return a - 9223372036854775807 }
+
+//go:noinline
+func sub_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 - a }
+
+//go:noinline
+func div_int64_Neg9223372036854775808(a int64) int64 { return a / -9223372036854775808 }
+
+//go:noinline
+func div_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 / a }
+
+//go:noinline
+func div_int64_Neg9223372036854775807(a int64) int64 { return a / -9223372036854775807 }
+
+//go:noinline
+func div_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 / a }
+
+//go:noinline
+func div_int64_Neg4294967296(a int64) int64 { return a / -4294967296 }
+
+//go:noinline
+func div_Neg4294967296_int64(a int64) int64 { return -4294967296 / a }
+
+//go:noinline
+func div_int64_Neg1(a int64) int64 { return a / -1 }
+
+//go:noinline
+func div_Neg1_int64(a int64) int64 { return -1 / a }
+
+//go:noinline
+func div_0_int64(a int64) int64 { return 0 / a }
+
+//go:noinline
+func div_int64_1(a int64) int64 { return a / 1 }
+
+//go:noinline
+func div_1_int64(a int64) int64 { return 1 / a }
+
+//go:noinline
+func div_int64_4294967296(a int64) int64 { return a / 4294967296 }
+
+//go:noinline
+func div_4294967296_int64(a int64) int64 { return 4294967296 / a }
+
+//go:noinline
+func div_int64_9223372036854775806(a int64) int64 { return a / 9223372036854775806 }
+
+//go:noinline
+func div_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 / a }
+
+//go:noinline
+func div_int64_9223372036854775807(a int64) int64 { return a / 9223372036854775807 }
+
+//go:noinline
+func div_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 / a }
+
+//go:noinline
+func mul_int64_Neg9223372036854775808(a int64) int64 { return a * -9223372036854775808 }
+
+//go:noinline
+func mul_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 * a }
+
+//go:noinline
+func mul_int64_Neg9223372036854775807(a int64) int64 { return a * -9223372036854775807 }
+
+//go:noinline
+func mul_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 * a }
+
+//go:noinline
+func mul_int64_Neg4294967296(a int64) int64 { return a * -4294967296 }
+
+//go:noinline
+func mul_Neg4294967296_int64(a int64) int64 { return -4294967296 * a }
+
+//go:noinline
+func mul_int64_Neg1(a int64) int64 { return a * -1 }
+
+//go:noinline
+func mul_Neg1_int64(a int64) int64 { return -1 * a }
+
+//go:noinline
+func mul_int64_0(a int64) int64 { return a * 0 }
+
+//go:noinline
+func mul_0_int64(a int64) int64 { return 0 * a }
+
+//go:noinline
+func mul_int64_1(a int64) int64 { return a * 1 }
+
+//go:noinline
+func mul_1_int64(a int64) int64 { return 1 * a }
+
+//go:noinline
+func mul_int64_4294967296(a int64) int64 { return a * 4294967296 }
+
+//go:noinline
+func mul_4294967296_int64(a int64) int64 { return 4294967296 * a }
+
+//go:noinline
+func mul_int64_9223372036854775806(a int64) int64 { return a * 9223372036854775806 }
+
+//go:noinline
+func mul_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 * a }
+
+//go:noinline
+func mul_int64_9223372036854775807(a int64) int64 { return a * 9223372036854775807 }
+
+//go:noinline
+func mul_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 * a }
+
+//go:noinline
+func mod_int64_Neg9223372036854775808(a int64) int64 { return a % -9223372036854775808 }
+
+//go:noinline
+func mod_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 % a }
+
+//go:noinline
+func mod_int64_Neg9223372036854775807(a int64) int64 { return a % -9223372036854775807 }
+
+//go:noinline
+func mod_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 % a }
+
+//go:noinline
+func mod_int64_Neg4294967296(a int64) int64 { return a % -4294967296 }
+
+//go:noinline
+func mod_Neg4294967296_int64(a int64) int64 { return -4294967296 % a }
+
+//go:noinline
+func mod_int64_Neg1(a int64) int64 { return a % -1 }
+
+//go:noinline
+func mod_Neg1_int64(a int64) int64 { return -1 % a }
+
+//go:noinline
+func mod_0_int64(a int64) int64 { return 0 % a }
+
+//go:noinline
+func mod_int64_1(a int64) int64 { return a % 1 }
+
+//go:noinline
+func mod_1_int64(a int64) int64 { return 1 % a }
+
+//go:noinline
+func mod_int64_4294967296(a int64) int64 { return a % 4294967296 }
+
+//go:noinline
+func mod_4294967296_int64(a int64) int64 { return 4294967296 % a }
+
+//go:noinline
+func mod_int64_9223372036854775806(a int64) int64 { return a % 9223372036854775806 }
+
+//go:noinline
+func mod_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 % a }
+
+//go:noinline
+func mod_int64_9223372036854775807(a int64) int64 { return a % 9223372036854775807 }
+
+//go:noinline
+func mod_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 % a }
+
+//go:noinline
+func and_int64_Neg9223372036854775808(a int64) int64 { return a & -9223372036854775808 }
+
+//go:noinline
+func and_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 & a }
+
+//go:noinline
+func and_int64_Neg9223372036854775807(a int64) int64 { return a & -9223372036854775807 }
+
+//go:noinline
+func and_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 & a }
+
+//go:noinline
+func and_int64_Neg4294967296(a int64) int64 { return a & -4294967296 }
+
+//go:noinline
+func and_Neg4294967296_int64(a int64) int64 { return -4294967296 & a }
+
+//go:noinline
+func and_int64_Neg1(a int64) int64 { return a & -1 }
+
+//go:noinline
+func and_Neg1_int64(a int64) int64 { return -1 & a }
+
+//go:noinline
+func and_int64_0(a int64) int64 { return a & 0 }
+
+//go:noinline
+func and_0_int64(a int64) int64 { return 0 & a }
+
+//go:noinline
+func and_int64_1(a int64) int64 { return a & 1 }
+
+//go:noinline
+func and_1_int64(a int64) int64 { return 1 & a }
+
+//go:noinline
+func and_int64_4294967296(a int64) int64 { return a & 4294967296 }
+
+//go:noinline
+func and_4294967296_int64(a int64) int64 { return 4294967296 & a }
+
+//go:noinline
+func and_int64_9223372036854775806(a int64) int64 { return a & 9223372036854775806 }
+
+//go:noinline
+func and_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 & a }
+
+//go:noinline
+func and_int64_9223372036854775807(a int64) int64 { return a & 9223372036854775807 }
+
+//go:noinline
+func and_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 & a }
+
+//go:noinline
+func or_int64_Neg9223372036854775808(a int64) int64 { return a | -9223372036854775808 }
+
+//go:noinline
+func or_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 | a }
+
+//go:noinline
+func or_int64_Neg9223372036854775807(a int64) int64 { return a | -9223372036854775807 }
+
+//go:noinline
+func or_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 | a }
+
+//go:noinline
+func or_int64_Neg4294967296(a int64) int64 { return a | -4294967296 }
+
+//go:noinline
+func or_Neg4294967296_int64(a int64) int64 { return -4294967296 | a }
+
+//go:noinline
+func or_int64_Neg1(a int64) int64 { return a | -1 }
+
+//go:noinline
+func or_Neg1_int64(a int64) int64 { return -1 | a }
+
+//go:noinline
+func or_int64_0(a int64) int64 { return a | 0 }
+
+//go:noinline
+func or_0_int64(a int64) int64 { return 0 | a }
+
+//go:noinline
+func or_int64_1(a int64) int64 { return a | 1 }
+
+//go:noinline
+func or_1_int64(a int64) int64 { return 1 | a }
+
+//go:noinline
+func or_int64_4294967296(a int64) int64 { return a | 4294967296 }
+
+//go:noinline
+func or_4294967296_int64(a int64) int64 { return 4294967296 | a }
+
+//go:noinline
+func or_int64_9223372036854775806(a int64) int64 { return a | 9223372036854775806 }
+
+//go:noinline
+func or_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 | a }
+
+//go:noinline
+func or_int64_9223372036854775807(a int64) int64 { return a | 9223372036854775807 }
+
+//go:noinline
+func or_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 | a }
+
+//go:noinline
+func xor_int64_Neg9223372036854775808(a int64) int64 { return a ^ -9223372036854775808 }
+
+//go:noinline
+func xor_Neg9223372036854775808_int64(a int64) int64 { return -9223372036854775808 ^ a }
+
+//go:noinline
+func xor_int64_Neg9223372036854775807(a int64) int64 { return a ^ -9223372036854775807 }
+
+//go:noinline
+func xor_Neg9223372036854775807_int64(a int64) int64 { return -9223372036854775807 ^ a }
+
+//go:noinline
+func xor_int64_Neg4294967296(a int64) int64 { return a ^ -4294967296 }
+
+//go:noinline
+func xor_Neg4294967296_int64(a int64) int64 { return -4294967296 ^ a }
+
+//go:noinline
+func xor_int64_Neg1(a int64) int64 { return a ^ -1 }
+
+//go:noinline
+func xor_Neg1_int64(a int64) int64 { return -1 ^ a }
+
+//go:noinline
+func xor_int64_0(a int64) int64 { return a ^ 0 }
+
+//go:noinline
+func xor_0_int64(a int64) int64 { return 0 ^ a }
+
+//go:noinline
+func xor_int64_1(a int64) int64 { return a ^ 1 }
+
+//go:noinline
+func xor_1_int64(a int64) int64 { return 1 ^ a }
+
+//go:noinline
+func xor_int64_4294967296(a int64) int64 { return a ^ 4294967296 }
+
+//go:noinline
+func xor_4294967296_int64(a int64) int64 { return 4294967296 ^ a }
+
+//go:noinline
+func xor_int64_9223372036854775806(a int64) int64 { return a ^ 9223372036854775806 }
+
+//go:noinline
+func xor_9223372036854775806_int64(a int64) int64 { return 9223372036854775806 ^ a }
+
+//go:noinline
+func xor_int64_9223372036854775807(a int64) int64 { return a ^ 9223372036854775807 }
+
+//go:noinline
+func xor_9223372036854775807_int64(a int64) int64 { return 9223372036854775807 ^ a }
+
+//go:noinline
+func mul_int64_Neg9(a int64) int64 { return a * -9 }
+
+//go:noinline
+func mul_Neg9_int64(a int64) int64 { return -9 * a }
+
+//go:noinline
+func mul_int64_Neg5(a int64) int64 { return a * -5 }
+
+//go:noinline
+func mul_Neg5_int64(a int64) int64 { return -5 * a }
+
+//go:noinline
+func mul_int64_Neg3(a int64) int64 { return a * -3 }
+
+//go:noinline
+func mul_Neg3_int64(a int64) int64 { return -3 * a }
+
+//go:noinline
+func mul_int64_3(a int64) int64 { return a * 3 }
+
+//go:noinline
+func mul_3_int64(a int64) int64 { return 3 * a }
+
+//go:noinline
+func mul_int64_5(a int64) int64 { return a * 5 }
+
+//go:noinline
+func mul_5_int64(a int64) int64 { return 5 * a }
+
+//go:noinline
+func mul_int64_7(a int64) int64 { return a * 7 }
+
+//go:noinline
+func mul_7_int64(a int64) int64 { return 7 * a }
+
+//go:noinline
+func mul_int64_9(a int64) int64 { return a * 9 }
+
+//go:noinline
+func mul_9_int64(a int64) int64 { return 9 * a }
+
+//go:noinline
+func mul_int64_10(a int64) int64 { return a * 10 }
+
+//go:noinline
+func mul_10_int64(a int64) int64 { return 10 * a }
+
+//go:noinline
+func mul_int64_11(a int64) int64 { return a * 11 }
+
+//go:noinline
+func mul_11_int64(a int64) int64 { return 11 * a }
+
+//go:noinline
+func mul_int64_13(a int64) int64 { return a * 13 }
+
+//go:noinline
+func mul_13_int64(a int64) int64 { return 13 * a }
+
+//go:noinline
+func mul_int64_19(a int64) int64 { return a * 19 }
+
+//go:noinline
+func mul_19_int64(a int64) int64 { return 19 * a }
+
+//go:noinline
+func mul_int64_21(a int64) int64 { return a * 21 }
+
+//go:noinline
+func mul_21_int64(a int64) int64 { return 21 * a }
+
+//go:noinline
+func mul_int64_25(a int64) int64 { return a * 25 }
+
+//go:noinline
+func mul_25_int64(a int64) int64 { return 25 * a }
+
+//go:noinline
+func mul_int64_27(a int64) int64 { return a * 27 }
+
+//go:noinline
+func mul_27_int64(a int64) int64 { return 27 * a }
+
+//go:noinline
+func mul_int64_37(a int64) int64 { return a * 37 }
+
+//go:noinline
+func mul_37_int64(a int64) int64 { return 37 * a }
+
+//go:noinline
+func mul_int64_41(a int64) int64 { return a * 41 }
+
+//go:noinline
+func mul_41_int64(a int64) int64 { return 41 * a }
+
+//go:noinline
+func mul_int64_45(a int64) int64 { return a * 45 }
+
+//go:noinline
+func mul_45_int64(a int64) int64 { return 45 * a }
+
+//go:noinline
+func mul_int64_73(a int64) int64 { return a * 73 }
+
+//go:noinline
+func mul_73_int64(a int64) int64 { return 73 * a }
+
+//go:noinline
+func mul_int64_81(a int64) int64 { return a * 81 }
+
+//go:noinline
+func mul_81_int64(a int64) int64 { return 81 * a }
+
+//go:noinline
+func add_uint32_0(a uint32) uint32 { return a + 0 }
+
+//go:noinline
+func add_0_uint32(a uint32) uint32 { return 0 + a }
+
+//go:noinline
+func add_uint32_1(a uint32) uint32 { return a + 1 }
+
+//go:noinline
+func add_1_uint32(a uint32) uint32 { return 1 + a }
+
+//go:noinline
+func add_uint32_4294967295(a uint32) uint32 { return a + 4294967295 }
+
+//go:noinline
+func add_4294967295_uint32(a uint32) uint32 { return 4294967295 + a }
+
+//go:noinline
+func sub_uint32_0(a uint32) uint32 { return a - 0 }
+
+//go:noinline
+func sub_0_uint32(a uint32) uint32 { return 0 - a }
+
+//go:noinline
+func sub_uint32_1(a uint32) uint32 { return a - 1 }
+
+//go:noinline
+func sub_1_uint32(a uint32) uint32 { return 1 - a }
+
+//go:noinline
+func sub_uint32_4294967295(a uint32) uint32 { return a - 4294967295 }
+
+//go:noinline
+func sub_4294967295_uint32(a uint32) uint32 { return 4294967295 - a }
+
+//go:noinline
+func div_0_uint32(a uint32) uint32 { return 0 / a }
+
+//go:noinline
+func div_uint32_1(a uint32) uint32 { return a / 1 }
+
+//go:noinline
+func div_1_uint32(a uint32) uint32 { return 1 / a }
+
+//go:noinline
+func div_uint32_4294967295(a uint32) uint32 { return a / 4294967295 }
+
+//go:noinline
+func div_4294967295_uint32(a uint32) uint32 { return 4294967295 / a }
+
+//go:noinline
+func mul_uint32_0(a uint32) uint32 { return a * 0 }
+
+//go:noinline
+func mul_0_uint32(a uint32) uint32 { return 0 * a }
+
+//go:noinline
+func mul_uint32_1(a uint32) uint32 { return a * 1 }
+
+//go:noinline
+func mul_1_uint32(a uint32) uint32 { return 1 * a }
+
+//go:noinline
+func mul_uint32_4294967295(a uint32) uint32 { return a * 4294967295 }
+
+//go:noinline
+func mul_4294967295_uint32(a uint32) uint32 { return 4294967295 * a }
+
+//go:noinline
+func lsh_uint32_0(a uint32) uint32 { return a << 0 }
+
+//go:noinline
+func lsh_0_uint32(a uint32) uint32 { return 0 << a }
+
+//go:noinline
+func lsh_uint32_1(a uint32) uint32 { return a << 1 }
+
+//go:noinline
+func lsh_1_uint32(a uint32) uint32 { return 1 << a }
+
+//go:noinline
+func lsh_uint32_4294967295(a uint32) uint32 { return a << 4294967295 }
+
+//go:noinline
+func lsh_4294967295_uint32(a uint32) uint32 { return 4294967295 << a }
+
+//go:noinline
+func rsh_uint32_0(a uint32) uint32 { return a >> 0 }
+
+//go:noinline
+func rsh_0_uint32(a uint32) uint32 { return 0 >> a }
+
+//go:noinline
+func rsh_uint32_1(a uint32) uint32 { return a >> 1 }
+
+//go:noinline
+func rsh_1_uint32(a uint32) uint32 { return 1 >> a }
+
+//go:noinline
+func rsh_uint32_4294967295(a uint32) uint32 { return a >> 4294967295 }
+
+//go:noinline
+func rsh_4294967295_uint32(a uint32) uint32 { return 4294967295 >> a }
+
+//go:noinline
+func mod_0_uint32(a uint32) uint32 { return 0 % a }
+
+//go:noinline
+func mod_uint32_1(a uint32) uint32 { return a % 1 }
+
+//go:noinline
+func mod_1_uint32(a uint32) uint32 { return 1 % a }
+
+//go:noinline
+func mod_uint32_4294967295(a uint32) uint32 { return a % 4294967295 }
+
+//go:noinline
+func mod_4294967295_uint32(a uint32) uint32 { return 4294967295 % a }
+
+//go:noinline
+func and_uint32_0(a uint32) uint32 { return a & 0 }
+
+//go:noinline
+func and_0_uint32(a uint32) uint32 { return 0 & a }
+
+//go:noinline
+func and_uint32_1(a uint32) uint32 { return a & 1 }
+
+//go:noinline
+func and_1_uint32(a uint32) uint32 { return 1 & a }
+
+//go:noinline
+func and_uint32_4294967295(a uint32) uint32 { return a & 4294967295 }
+
+//go:noinline
+func and_4294967295_uint32(a uint32) uint32 { return 4294967295 & a }
+
+//go:noinline
+func or_uint32_0(a uint32) uint32 { return a | 0 }
+
+//go:noinline
+func or_0_uint32(a uint32) uint32 { return 0 | a }
+
+//go:noinline
+func or_uint32_1(a uint32) uint32 { return a | 1 }
+
+//go:noinline
+func or_1_uint32(a uint32) uint32 { return 1 | a }
+
+//go:noinline
+func or_uint32_4294967295(a uint32) uint32 { return a | 4294967295 }
+
+//go:noinline
+func or_4294967295_uint32(a uint32) uint32 { return 4294967295 | a }
+
+//go:noinline
+func xor_uint32_0(a uint32) uint32 { return a ^ 0 }
+
+//go:noinline
+func xor_0_uint32(a uint32) uint32 { return 0 ^ a }
+
+//go:noinline
+func xor_uint32_1(a uint32) uint32 { return a ^ 1 }
+
+//go:noinline
+func xor_1_uint32(a uint32) uint32 { return 1 ^ a }
+
+//go:noinline
+func xor_uint32_4294967295(a uint32) uint32 { return a ^ 4294967295 }
+
+//go:noinline
+func xor_4294967295_uint32(a uint32) uint32 { return 4294967295 ^ a }
+
+//go:noinline
+func mul_uint32_3(a uint32) uint32 { return a * 3 }
+
+//go:noinline
+func mul_3_uint32(a uint32) uint32 { return 3 * a }
+
+//go:noinline
+func mul_uint32_5(a uint32) uint32 { return a * 5 }
+
+//go:noinline
+func mul_5_uint32(a uint32) uint32 { return 5 * a }
+
+//go:noinline
+func mul_uint32_7(a uint32) uint32 { return a * 7 }
+
+//go:noinline
+func mul_7_uint32(a uint32) uint32 { return 7 * a }
+
+//go:noinline
+func mul_uint32_9(a uint32) uint32 { return a * 9 }
+
+//go:noinline
+func mul_9_uint32(a uint32) uint32 { return 9 * a }
+
+//go:noinline
+func mul_uint32_10(a uint32) uint32 { return a * 10 }
+
+//go:noinline
+func mul_10_uint32(a uint32) uint32 { return 10 * a }
+
+//go:noinline
+func mul_uint32_11(a uint32) uint32 { return a * 11 }
+
+//go:noinline
+func mul_11_uint32(a uint32) uint32 { return 11 * a }
+
+//go:noinline
+func mul_uint32_13(a uint32) uint32 { return a * 13 }
+
+//go:noinline
+func mul_13_uint32(a uint32) uint32 { return 13 * a }
+
+//go:noinline
+func mul_uint32_19(a uint32) uint32 { return a * 19 }
+
+//go:noinline
+func mul_19_uint32(a uint32) uint32 { return 19 * a }
+
+//go:noinline
+func mul_uint32_21(a uint32) uint32 { return a * 21 }
+
+//go:noinline
+func mul_21_uint32(a uint32) uint32 { return 21 * a }
+
+//go:noinline
+func mul_uint32_25(a uint32) uint32 { return a * 25 }
+
+//go:noinline
+func mul_25_uint32(a uint32) uint32 { return 25 * a }
+
+//go:noinline
+func mul_uint32_27(a uint32) uint32 { return a * 27 }
+
+//go:noinline
+func mul_27_uint32(a uint32) uint32 { return 27 * a }
+
+//go:noinline
+func mul_uint32_37(a uint32) uint32 { return a * 37 }
+
+//go:noinline
+func mul_37_uint32(a uint32) uint32 { return 37 * a }
+
+//go:noinline
+func mul_uint32_41(a uint32) uint32 { return a * 41 }
+
+//go:noinline
+func mul_41_uint32(a uint32) uint32 { return 41 * a }
+
+//go:noinline
+func mul_uint32_45(a uint32) uint32 { return a * 45 }
+
+//go:noinline
+func mul_45_uint32(a uint32) uint32 { return 45 * a }
+
+//go:noinline
+func mul_uint32_73(a uint32) uint32 { return a * 73 }
+
+//go:noinline
+func mul_73_uint32(a uint32) uint32 { return 73 * a }
+
+//go:noinline
+func mul_uint32_81(a uint32) uint32 { return a * 81 }
+
+//go:noinline
+func mul_81_uint32(a uint32) uint32 { return 81 * a }
+
+//go:noinline
+func add_int32_Neg2147483648(a int32) int32 { return a + -2147483648 }
+
+//go:noinline
+func add_Neg2147483648_int32(a int32) int32 { return -2147483648 + a }
+
+//go:noinline
+func add_int32_Neg2147483647(a int32) int32 { return a + -2147483647 }
+
+//go:noinline
+func add_Neg2147483647_int32(a int32) int32 { return -2147483647 + a }
+
+//go:noinline
+func add_int32_Neg1(a int32) int32 { return a + -1 }
+
+//go:noinline
+func add_Neg1_int32(a int32) int32 { return -1 + a }
+
+//go:noinline
+func add_int32_0(a int32) int32 { return a + 0 }
+
+//go:noinline
+func add_0_int32(a int32) int32 { return 0 + a }
+
+//go:noinline
+func add_int32_1(a int32) int32 { return a + 1 }
+
+//go:noinline
+func add_1_int32(a int32) int32 { return 1 + a }
+
+//go:noinline
+func add_int32_2147483647(a int32) int32 { return a + 2147483647 }
+
+//go:noinline
+func add_2147483647_int32(a int32) int32 { return 2147483647 + a }
+
+//go:noinline
+func sub_int32_Neg2147483648(a int32) int32 { return a - -2147483648 }
+
+//go:noinline
+func sub_Neg2147483648_int32(a int32) int32 { return -2147483648 - a }
+
+//go:noinline
+func sub_int32_Neg2147483647(a int32) int32 { return a - -2147483647 }
+
+//go:noinline
+func sub_Neg2147483647_int32(a int32) int32 { return -2147483647 - a }
+
+//go:noinline
+func sub_int32_Neg1(a int32) int32 { return a - -1 }
+
+//go:noinline
+func sub_Neg1_int32(a int32) int32 { return -1 - a }
+
+//go:noinline
+func sub_int32_0(a int32) int32 { return a - 0 }
+
+//go:noinline
+func sub_0_int32(a int32) int32 { return 0 - a }
+
+//go:noinline
+func sub_int32_1(a int32) int32 { return a - 1 }
+
+//go:noinline
+func sub_1_int32(a int32) int32 { return 1 - a }
+
+//go:noinline
+func sub_int32_2147483647(a int32) int32 { return a - 2147483647 }
+
+//go:noinline
+func sub_2147483647_int32(a int32) int32 { return 2147483647 - a }
+
+//go:noinline
+func div_int32_Neg2147483648(a int32) int32 { return a / -2147483648 }
+
+//go:noinline
+func div_Neg2147483648_int32(a int32) int32 { return -2147483648 / a }
+
+//go:noinline
+func div_int32_Neg2147483647(a int32) int32 { return a / -2147483647 }
+
+//go:noinline
+func div_Neg2147483647_int32(a int32) int32 { return -2147483647 / a }
+
+//go:noinline
+func div_int32_Neg1(a int32) int32 { return a / -1 }
+
+//go:noinline
+func div_Neg1_int32(a int32) int32 { return -1 / a }
+
+//go:noinline
+func div_0_int32(a int32) int32 { return 0 / a }
+
+//go:noinline
+func div_int32_1(a int32) int32 { return a / 1 }
+
+//go:noinline
+func div_1_int32(a int32) int32 { return 1 / a }
+
+//go:noinline
+func div_int32_2147483647(a int32) int32 { return a / 2147483647 }
+
+//go:noinline
+func div_2147483647_int32(a int32) int32 { return 2147483647 / a }
+
+//go:noinline
+func mul_int32_Neg2147483648(a int32) int32 { return a * -2147483648 }
+
+//go:noinline
+func mul_Neg2147483648_int32(a int32) int32 { return -2147483648 * a }
+
+//go:noinline
+func mul_int32_Neg2147483647(a int32) int32 { return a * -2147483647 }
+
+//go:noinline
+func mul_Neg2147483647_int32(a int32) int32 { return -2147483647 * a }
+
+//go:noinline
+func mul_int32_Neg1(a int32) int32 { return a * -1 }
+
+//go:noinline
+func mul_Neg1_int32(a int32) int32 { return -1 * a }
+
+//go:noinline
+func mul_int32_0(a int32) int32 { return a * 0 }
+
+//go:noinline
+func mul_0_int32(a int32) int32 { return 0 * a }
+
+//go:noinline
+func mul_int32_1(a int32) int32 { return a * 1 }
+
+//go:noinline
+func mul_1_int32(a int32) int32 { return 1 * a }
+
+//go:noinline
+func mul_int32_2147483647(a int32) int32 { return a * 2147483647 }
+
+//go:noinline
+func mul_2147483647_int32(a int32) int32 { return 2147483647 * a }
+
+//go:noinline
+func mod_int32_Neg2147483648(a int32) int32 { return a % -2147483648 }
+
+//go:noinline
+func mod_Neg2147483648_int32(a int32) int32 { return -2147483648 % a }
+
+//go:noinline
+func mod_int32_Neg2147483647(a int32) int32 { return a % -2147483647 }
+
+//go:noinline
+func mod_Neg2147483647_int32(a int32) int32 { return -2147483647 % a }
+
+//go:noinline
+func mod_int32_Neg1(a int32) int32 { return a % -1 }
+
+//go:noinline
+func mod_Neg1_int32(a int32) int32 { return -1 % a }
+
+//go:noinline
+func mod_0_int32(a int32) int32 { return 0 % a }
+
+//go:noinline
+func mod_int32_1(a int32) int32 { return a % 1 }
+
+//go:noinline
+func mod_1_int32(a int32) int32 { return 1 % a }
+
+//go:noinline
+func mod_int32_2147483647(a int32) int32 { return a % 2147483647 }
+
+//go:noinline
+func mod_2147483647_int32(a int32) int32 { return 2147483647 % a }
+
+//go:noinline
+func and_int32_Neg2147483648(a int32) int32 { return a & -2147483648 }
+
+//go:noinline
+func and_Neg2147483648_int32(a int32) int32 { return -2147483648 & a }
+
+//go:noinline
+func and_int32_Neg2147483647(a int32) int32 { return a & -2147483647 }
+
+//go:noinline
+func and_Neg2147483647_int32(a int32) int32 { return -2147483647 & a }
+
+//go:noinline
+func and_int32_Neg1(a int32) int32 { return a & -1 }
+
+//go:noinline
+func and_Neg1_int32(a int32) int32 { return -1 & a }
+
+//go:noinline
+func and_int32_0(a int32) int32 { return a & 0 }
+
+//go:noinline
+func and_0_int32(a int32) int32 { return 0 & a }
+
+//go:noinline
+func and_int32_1(a int32) int32 { return a & 1 }
+
+//go:noinline
+func and_1_int32(a int32) int32 { return 1 & a }
+
+//go:noinline
+func and_int32_2147483647(a int32) int32 { return a & 2147483647 }
+
+//go:noinline
+func and_2147483647_int32(a int32) int32 { return 2147483647 & a }
+
+//go:noinline
+func or_int32_Neg2147483648(a int32) int32 { return a | -2147483648 }
+
+//go:noinline
+func or_Neg2147483648_int32(a int32) int32 { return -2147483648 | a }
+
+//go:noinline
+func or_int32_Neg2147483647(a int32) int32 { return a | -2147483647 }
+
+//go:noinline
+func or_Neg2147483647_int32(a int32) int32 { return -2147483647 | a }
+
+//go:noinline
+func or_int32_Neg1(a int32) int32 { return a | -1 }
+
+//go:noinline
+func or_Neg1_int32(a int32) int32 { return -1 | a }
+
+//go:noinline
+func or_int32_0(a int32) int32 { return a | 0 }
+
+//go:noinline
+func or_0_int32(a int32) int32 { return 0 | a }
+
+//go:noinline
+func or_int32_1(a int32) int32 { return a | 1 }
+
+//go:noinline
+func or_1_int32(a int32) int32 { return 1 | a }
+
+//go:noinline
+func or_int32_2147483647(a int32) int32 { return a | 2147483647 }
+
+//go:noinline
+func or_2147483647_int32(a int32) int32 { return 2147483647 | a }
+
+//go:noinline
+func xor_int32_Neg2147483648(a int32) int32 { return a ^ -2147483648 }
+
+//go:noinline
+func xor_Neg2147483648_int32(a int32) int32 { return -2147483648 ^ a }
+
+//go:noinline
+func xor_int32_Neg2147483647(a int32) int32 { return a ^ -2147483647 }
+
+//go:noinline
+func xor_Neg2147483647_int32(a int32) int32 { return -2147483647 ^ a }
+
+//go:noinline
+func xor_int32_Neg1(a int32) int32 { return a ^ -1 }
+
+//go:noinline
+func xor_Neg1_int32(a int32) int32 { return -1 ^ a }
+
+//go:noinline
+func xor_int32_0(a int32) int32 { return a ^ 0 }
+
+//go:noinline
+func xor_0_int32(a int32) int32 { return 0 ^ a }
+
+//go:noinline
+func xor_int32_1(a int32) int32 { return a ^ 1 }
+
+//go:noinline
+func xor_1_int32(a int32) int32 { return 1 ^ a }
+
+//go:noinline
+func xor_int32_2147483647(a int32) int32 { return a ^ 2147483647 }
+
+//go:noinline
+func xor_2147483647_int32(a int32) int32 { return 2147483647 ^ a }
+
+//go:noinline
+func mul_int32_Neg9(a int32) int32 { return a * -9 }
+
+//go:noinline
+func mul_Neg9_int32(a int32) int32 { return -9 * a }
+
+//go:noinline
+func mul_int32_Neg5(a int32) int32 { return a * -5 }
+
+//go:noinline
+func mul_Neg5_int32(a int32) int32 { return -5 * a }
+
+//go:noinline
+func mul_int32_Neg3(a int32) int32 { return a * -3 }
+
+//go:noinline
+func mul_Neg3_int32(a int32) int32 { return -3 * a }
+
+//go:noinline
+func mul_int32_3(a int32) int32 { return a * 3 }
+
+//go:noinline
+func mul_3_int32(a int32) int32 { return 3 * a }
+
+//go:noinline
+func mul_int32_5(a int32) int32 { return a * 5 }
+
+//go:noinline
+func mul_5_int32(a int32) int32 { return 5 * a }
+
+//go:noinline
+func mul_int32_7(a int32) int32 { return a * 7 }
+
+//go:noinline
+func mul_7_int32(a int32) int32 { return 7 * a }
+
+//go:noinline
+func mul_int32_9(a int32) int32 { return a * 9 }
+
+//go:noinline
+func mul_9_int32(a int32) int32 { return 9 * a }
+
+//go:noinline
+func mul_int32_10(a int32) int32 { return a * 10 }
+
+//go:noinline
+func mul_10_int32(a int32) int32 { return 10 * a }
+
+//go:noinline
+func mul_int32_11(a int32) int32 { return a * 11 }
+
+//go:noinline
+func mul_11_int32(a int32) int32 { return 11 * a }
+
+//go:noinline
+func mul_int32_13(a int32) int32 { return a * 13 }
+
+//go:noinline
+func mul_13_int32(a int32) int32 { return 13 * a }
+
+//go:noinline
+func mul_int32_19(a int32) int32 { return a * 19 }
+
+//go:noinline
+func mul_19_int32(a int32) int32 { return 19 * a }
+
+//go:noinline
+func mul_int32_21(a int32) int32 { return a * 21 }
+
+//go:noinline
+func mul_21_int32(a int32) int32 { return 21 * a }
+
+//go:noinline
+func mul_int32_25(a int32) int32 { return a * 25 }
+
+//go:noinline
+func mul_25_int32(a int32) int32 { return 25 * a }
+
+//go:noinline
+func mul_int32_27(a int32) int32 { return a * 27 }
+
+//go:noinline
+func mul_27_int32(a int32) int32 { return 27 * a }
+
+//go:noinline
+func mul_int32_37(a int32) int32 { return a * 37 }
+
+//go:noinline
+func mul_37_int32(a int32) int32 { return 37 * a }
+
+//go:noinline
+func mul_int32_41(a int32) int32 { return a * 41 }
+
+//go:noinline
+func mul_41_int32(a int32) int32 { return 41 * a }
+
+//go:noinline
+func mul_int32_45(a int32) int32 { return a * 45 }
+
+//go:noinline
+func mul_45_int32(a int32) int32 { return 45 * a }
+
+//go:noinline
+func mul_int32_73(a int32) int32 { return a * 73 }
+
+//go:noinline
+func mul_73_int32(a int32) int32 { return 73 * a }
+
+//go:noinline
+func mul_int32_81(a int32) int32 { return a * 81 }
+
+//go:noinline
+func mul_81_int32(a int32) int32 { return 81 * a }
+
+//go:noinline
+func add_uint16_0(a uint16) uint16 { return a + 0 }
+
+//go:noinline
+func add_0_uint16(a uint16) uint16 { return 0 + a }
+
+//go:noinline
+func add_uint16_1(a uint16) uint16 { return a + 1 }
+
+//go:noinline
+func add_1_uint16(a uint16) uint16 { return 1 + a }
+
+//go:noinline
+func add_uint16_65535(a uint16) uint16 { return a + 65535 }
+
+//go:noinline
+func add_65535_uint16(a uint16) uint16 { return 65535 + a }
+
+//go:noinline
+func sub_uint16_0(a uint16) uint16 { return a - 0 }
+
+//go:noinline
+func sub_0_uint16(a uint16) uint16 { return 0 - a }
+
+//go:noinline
+func sub_uint16_1(a uint16) uint16 { return a - 1 }
+
+//go:noinline
+func sub_1_uint16(a uint16) uint16 { return 1 - a }
+
+//go:noinline
+func sub_uint16_65535(a uint16) uint16 { return a - 65535 }
+
+//go:noinline
+func sub_65535_uint16(a uint16) uint16 { return 65535 - a }
+
+//go:noinline
+func div_0_uint16(a uint16) uint16 { return 0 / a }
+
+//go:noinline
+func div_uint16_1(a uint16) uint16 { return a / 1 }
+
+//go:noinline
+func div_1_uint16(a uint16) uint16 { return 1 / a }
+
+//go:noinline
+func div_uint16_65535(a uint16) uint16 { return a / 65535 }
+
+//go:noinline
+func div_65535_uint16(a uint16) uint16 { return 65535 / a }
+
+//go:noinline
+func mul_uint16_0(a uint16) uint16 { return a * 0 }
+
+//go:noinline
+func mul_0_uint16(a uint16) uint16 { return 0 * a }
+
+//go:noinline
+func mul_uint16_1(a uint16) uint16 { return a * 1 }
+
+//go:noinline
+func mul_1_uint16(a uint16) uint16 { return 1 * a }
+
+//go:noinline
+func mul_uint16_65535(a uint16) uint16 { return a * 65535 }
+
+//go:noinline
+func mul_65535_uint16(a uint16) uint16 { return 65535 * a }
+
+//go:noinline
+func lsh_uint16_0(a uint16) uint16 { return a << 0 }
+
+//go:noinline
+func lsh_0_uint16(a uint16) uint16 { return 0 << a }
+
+//go:noinline
+func lsh_uint16_1(a uint16) uint16 { return a << 1 }
+
+//go:noinline
+func lsh_1_uint16(a uint16) uint16 { return 1 << a }
+
+//go:noinline
+func lsh_uint16_65535(a uint16) uint16 { return a << 65535 }
+
+//go:noinline
+func lsh_65535_uint16(a uint16) uint16 { return 65535 << a }
+
+//go:noinline
+func rsh_uint16_0(a uint16) uint16 { return a >> 0 }
+
+//go:noinline
+func rsh_0_uint16(a uint16) uint16 { return 0 >> a }
+
+//go:noinline
+func rsh_uint16_1(a uint16) uint16 { return a >> 1 }
+
+//go:noinline
+func rsh_1_uint16(a uint16) uint16 { return 1 >> a }
+
+//go:noinline
+func rsh_uint16_65535(a uint16) uint16 { return a >> 65535 }
+
+//go:noinline
+func rsh_65535_uint16(a uint16) uint16 { return 65535 >> a }
+
+//go:noinline
+func mod_0_uint16(a uint16) uint16 { return 0 % a }
+
+//go:noinline
+func mod_uint16_1(a uint16) uint16 { return a % 1 }
+
+//go:noinline
+func mod_1_uint16(a uint16) uint16 { return 1 % a }
+
+//go:noinline
+func mod_uint16_65535(a uint16) uint16 { return a % 65535 }
+
+//go:noinline
+func mod_65535_uint16(a uint16) uint16 { return 65535 % a }
+
+//go:noinline
+func and_uint16_0(a uint16) uint16 { return a & 0 }
+
+//go:noinline
+func and_0_uint16(a uint16) uint16 { return 0 & a }
+
+//go:noinline
+func and_uint16_1(a uint16) uint16 { return a & 1 }
+
+//go:noinline
+func and_1_uint16(a uint16) uint16 { return 1 & a }
+
+//go:noinline
+func and_uint16_65535(a uint16) uint16 { return a & 65535 }
+
+//go:noinline
+func and_65535_uint16(a uint16) uint16 { return 65535 & a }
+
+//go:noinline
+func or_uint16_0(a uint16) uint16 { return a | 0 }
+
+//go:noinline
+func or_0_uint16(a uint16) uint16 { return 0 | a }
+
+//go:noinline
+func or_uint16_1(a uint16) uint16 { return a | 1 }
+
+//go:noinline
+func or_1_uint16(a uint16) uint16 { return 1 | a }
+
+//go:noinline
+func or_uint16_65535(a uint16) uint16 { return a | 65535 }
+
+//go:noinline
+func or_65535_uint16(a uint16) uint16 { return 65535 | a }
+
+//go:noinline
+func xor_uint16_0(a uint16) uint16 { return a ^ 0 }
+
+//go:noinline
+func xor_0_uint16(a uint16) uint16 { return 0 ^ a }
+
+//go:noinline
+func xor_uint16_1(a uint16) uint16 { return a ^ 1 }
+
+//go:noinline
+func xor_1_uint16(a uint16) uint16 { return 1 ^ a }
+
+//go:noinline
+func xor_uint16_65535(a uint16) uint16 { return a ^ 65535 }
+
+//go:noinline
+func xor_65535_uint16(a uint16) uint16 { return 65535 ^ a }
+
+//go:noinline
+func add_int16_Neg32768(a int16) int16 { return a + -32768 }
+
+//go:noinline
+func add_Neg32768_int16(a int16) int16 { return -32768 + a }
+
+//go:noinline
+func add_int16_Neg32767(a int16) int16 { return a + -32767 }
+
+//go:noinline
+func add_Neg32767_int16(a int16) int16 { return -32767 + a }
+
+//go:noinline
+func add_int16_Neg1(a int16) int16 { return a + -1 }
+
+//go:noinline
+func add_Neg1_int16(a int16) int16 { return -1 + a }
+
+//go:noinline
+func add_int16_0(a int16) int16 { return a + 0 }
+
+//go:noinline
+func add_0_int16(a int16) int16 { return 0 + a }
+
+//go:noinline
+func add_int16_1(a int16) int16 { return a + 1 }
+
+//go:noinline
+func add_1_int16(a int16) int16 { return 1 + a }
+
+//go:noinline
+func add_int16_32766(a int16) int16 { return a + 32766 }
+
+//go:noinline
+func add_32766_int16(a int16) int16 { return 32766 + a }
+
+//go:noinline
+func add_int16_32767(a int16) int16 { return a + 32767 }
+
+//go:noinline
+func add_32767_int16(a int16) int16 { return 32767 + a }
+
+//go:noinline
+func sub_int16_Neg32768(a int16) int16 { return a - -32768 }
+
+//go:noinline
+func sub_Neg32768_int16(a int16) int16 { return -32768 - a }
+
+//go:noinline
+func sub_int16_Neg32767(a int16) int16 { return a - -32767 }
+
+//go:noinline
+func sub_Neg32767_int16(a int16) int16 { return -32767 - a }
+
+//go:noinline
+func sub_int16_Neg1(a int16) int16 { return a - -1 }
+
+//go:noinline
+func sub_Neg1_int16(a int16) int16 { return -1 - a }
+
+//go:noinline
+func sub_int16_0(a int16) int16 { return a - 0 }
+
+//go:noinline
+func sub_0_int16(a int16) int16 { return 0 - a }
+
+//go:noinline
+func sub_int16_1(a int16) int16 { return a - 1 }
+
+//go:noinline
+func sub_1_int16(a int16) int16 { return 1 - a }
+
+//go:noinline
+func sub_int16_32766(a int16) int16 { return a - 32766 }
+
+//go:noinline
+func sub_32766_int16(a int16) int16 { return 32766 - a }
+
+//go:noinline
+func sub_int16_32767(a int16) int16 { return a - 32767 }
+
+//go:noinline
+func sub_32767_int16(a int16) int16 { return 32767 - a }
+
+//go:noinline
+func div_int16_Neg32768(a int16) int16 { return a / -32768 }
+
+//go:noinline
+func div_Neg32768_int16(a int16) int16 { return -32768 / a }
+
+//go:noinline
+func div_int16_Neg32767(a int16) int16 { return a / -32767 }
+
+//go:noinline
+func div_Neg32767_int16(a int16) int16 { return -32767 / a }
+
+//go:noinline
+func div_int16_Neg1(a int16) int16 { return a / -1 }
+
+//go:noinline
+func div_Neg1_int16(a int16) int16 { return -1 / a }
+
+//go:noinline
+func div_0_int16(a int16) int16 { return 0 / a }
+
+//go:noinline
+func div_int16_1(a int16) int16 { return a / 1 }
+
+//go:noinline
+func div_1_int16(a int16) int16 { return 1 / a }
+
+//go:noinline
+func div_int16_32766(a int16) int16 { return a / 32766 }
+
+//go:noinline
+func div_32766_int16(a int16) int16 { return 32766 / a }
+
+//go:noinline
+func div_int16_32767(a int16) int16 { return a / 32767 }
+
+//go:noinline
+func div_32767_int16(a int16) int16 { return 32767 / a }
+
+//go:noinline
+func mul_int16_Neg32768(a int16) int16 { return a * -32768 }
+
+//go:noinline
+func mul_Neg32768_int16(a int16) int16 { return -32768 * a }
+
+//go:noinline
+func mul_int16_Neg32767(a int16) int16 { return a * -32767 }
+
+//go:noinline
+func mul_Neg32767_int16(a int16) int16 { return -32767 * a }
+
+//go:noinline
+func mul_int16_Neg1(a int16) int16 { return a * -1 }
+
+//go:noinline
+func mul_Neg1_int16(a int16) int16 { return -1 * a }
+
+//go:noinline
+func mul_int16_0(a int16) int16 { return a * 0 }
+
+//go:noinline
+func mul_0_int16(a int16) int16 { return 0 * a }
+
+//go:noinline
+func mul_int16_1(a int16) int16 { return a * 1 }
+
+//go:noinline
+func mul_1_int16(a int16) int16 { return 1 * a }
+
+//go:noinline
+func mul_int16_32766(a int16) int16 { return a * 32766 }
+
+//go:noinline
+func mul_32766_int16(a int16) int16 { return 32766 * a }
+
+//go:noinline
+func mul_int16_32767(a int16) int16 { return a * 32767 }
+
+//go:noinline
+func mul_32767_int16(a int16) int16 { return 32767 * a }
+
+//go:noinline
+func mod_int16_Neg32768(a int16) int16 { return a % -32768 }
+
+//go:noinline
+func mod_Neg32768_int16(a int16) int16 { return -32768 % a }
+
+//go:noinline
+func mod_int16_Neg32767(a int16) int16 { return a % -32767 }
+
+//go:noinline
+func mod_Neg32767_int16(a int16) int16 { return -32767 % a }
+
+//go:noinline
+func mod_int16_Neg1(a int16) int16 { return a % -1 }
+
+//go:noinline
+func mod_Neg1_int16(a int16) int16 { return -1 % a }
+
+//go:noinline
+func mod_0_int16(a int16) int16 { return 0 % a }
+
+//go:noinline
+func mod_int16_1(a int16) int16 { return a % 1 }
+
+//go:noinline
+func mod_1_int16(a int16) int16 { return 1 % a }
+
+//go:noinline
+func mod_int16_32766(a int16) int16 { return a % 32766 }
+
+//go:noinline
+func mod_32766_int16(a int16) int16 { return 32766 % a }
+
+//go:noinline
+func mod_int16_32767(a int16) int16 { return a % 32767 }
+
+//go:noinline
+func mod_32767_int16(a int16) int16 { return 32767 % a }
+
+//go:noinline
+func and_int16_Neg32768(a int16) int16 { return a & -32768 }
+
+//go:noinline
+func and_Neg32768_int16(a int16) int16 { return -32768 & a }
+
+//go:noinline
+func and_int16_Neg32767(a int16) int16 { return a & -32767 }
+
+//go:noinline
+func and_Neg32767_int16(a int16) int16 { return -32767 & a }
+
+//go:noinline
+func and_int16_Neg1(a int16) int16 { return a & -1 }
+
+//go:noinline
+func and_Neg1_int16(a int16) int16 { return -1 & a }
+
+//go:noinline
+func and_int16_0(a int16) int16 { return a & 0 }
+
+//go:noinline
+func and_0_int16(a int16) int16 { return 0 & a }
+
+//go:noinline
+func and_int16_1(a int16) int16 { return a & 1 }
+
+//go:noinline
+func and_1_int16(a int16) int16 { return 1 & a }
+
+//go:noinline
+func and_int16_32766(a int16) int16 { return a & 32766 }
+
+//go:noinline
+func and_32766_int16(a int16) int16 { return 32766 & a }
+
+//go:noinline
+func and_int16_32767(a int16) int16 { return a & 32767 }
+
+//go:noinline
+func and_32767_int16(a int16) int16 { return 32767 & a }
+
+//go:noinline
+func or_int16_Neg32768(a int16) int16 { return a | -32768 }
+
+//go:noinline
+func or_Neg32768_int16(a int16) int16 { return -32768 | a }
+
+//go:noinline
+func or_int16_Neg32767(a int16) int16 { return a | -32767 }
+
+//go:noinline
+func or_Neg32767_int16(a int16) int16 { return -32767 | a }
+
+//go:noinline
+func or_int16_Neg1(a int16) int16 { return a | -1 }
+
+//go:noinline
+func or_Neg1_int16(a int16) int16 { return -1 | a }
+
+//go:noinline
+func or_int16_0(a int16) int16 { return a | 0 }
+
+//go:noinline
+func or_0_int16(a int16) int16 { return 0 | a }
+
+//go:noinline
+func or_int16_1(a int16) int16 { return a | 1 }
+
+//go:noinline
+func or_1_int16(a int16) int16 { return 1 | a }
+
+//go:noinline
+func or_int16_32766(a int16) int16 { return a | 32766 }
+
+//go:noinline
+func or_32766_int16(a int16) int16 { return 32766 | a }
+
+//go:noinline
+func or_int16_32767(a int16) int16 { return a | 32767 }
+
+//go:noinline
+func or_32767_int16(a int16) int16 { return 32767 | a }
+
+//go:noinline
+func xor_int16_Neg32768(a int16) int16 { return a ^ -32768 }
+
+//go:noinline
+func xor_Neg32768_int16(a int16) int16 { return -32768 ^ a }
+
+//go:noinline
+func xor_int16_Neg32767(a int16) int16 { return a ^ -32767 }
+
+//go:noinline
+func xor_Neg32767_int16(a int16) int16 { return -32767 ^ a }
+
+//go:noinline
+func xor_int16_Neg1(a int16) int16 { return a ^ -1 }
+
+//go:noinline
+func xor_Neg1_int16(a int16) int16 { return -1 ^ a }
+
+//go:noinline
+func xor_int16_0(a int16) int16 { return a ^ 0 }
+
+//go:noinline
+func xor_0_int16(a int16) int16 { return 0 ^ a }
+
+//go:noinline
+func xor_int16_1(a int16) int16 { return a ^ 1 }
+
+//go:noinline
+func xor_1_int16(a int16) int16 { return 1 ^ a }
+
+//go:noinline
+func xor_int16_32766(a int16) int16 { return a ^ 32766 }
+
+//go:noinline
+func xor_32766_int16(a int16) int16 { return 32766 ^ a }
+
+//go:noinline
+func xor_int16_32767(a int16) int16 { return a ^ 32767 }
+
+//go:noinline
+func xor_32767_int16(a int16) int16 { return 32767 ^ a }
+
+//go:noinline
+func add_uint8_0(a uint8) uint8 { return a + 0 }
+
+//go:noinline
+func add_0_uint8(a uint8) uint8 { return 0 + a }
+
+//go:noinline
+func add_uint8_1(a uint8) uint8 { return a + 1 }
+
+//go:noinline
+func add_1_uint8(a uint8) uint8 { return 1 + a }
+
+//go:noinline
+func add_uint8_255(a uint8) uint8 { return a + 255 }
+
+//go:noinline
+func add_255_uint8(a uint8) uint8 { return 255 + a }
+
+//go:noinline
+func sub_uint8_0(a uint8) uint8 { return a - 0 }
+
+//go:noinline
+func sub_0_uint8(a uint8) uint8 { return 0 - a }
+
+//go:noinline
+func sub_uint8_1(a uint8) uint8 { return a - 1 }
+
+//go:noinline
+func sub_1_uint8(a uint8) uint8 { return 1 - a }
+
+//go:noinline
+func sub_uint8_255(a uint8) uint8 { return a - 255 }
+
+//go:noinline
+func sub_255_uint8(a uint8) uint8 { return 255 - a }
+
+//go:noinline
+func div_0_uint8(a uint8) uint8 { return 0 / a }
+
+//go:noinline
+func div_uint8_1(a uint8) uint8 { return a / 1 }
+
+//go:noinline
+func div_1_uint8(a uint8) uint8 { return 1 / a }
+
+//go:noinline
+func div_uint8_255(a uint8) uint8 { return a / 255 }
+
+//go:noinline
+func div_255_uint8(a uint8) uint8 { return 255 / a }
+
+//go:noinline
+func mul_uint8_0(a uint8) uint8 { return a * 0 }
+
+//go:noinline
+func mul_0_uint8(a uint8) uint8 { return 0 * a }
+
+//go:noinline
+func mul_uint8_1(a uint8) uint8 { return a * 1 }
+
+//go:noinline
+func mul_1_uint8(a uint8) uint8 { return 1 * a }
+
+//go:noinline
+func mul_uint8_255(a uint8) uint8 { return a * 255 }
+
+//go:noinline
+func mul_255_uint8(a uint8) uint8 { return 255 * a }
+
+//go:noinline
+func lsh_uint8_0(a uint8) uint8 { return a << 0 }
+
+//go:noinline
+func lsh_0_uint8(a uint8) uint8 { return 0 << a }
+
+//go:noinline
+func lsh_uint8_1(a uint8) uint8 { return a << 1 }
+
+//go:noinline
+func lsh_1_uint8(a uint8) uint8 { return 1 << a }
+
+//go:noinline
+func lsh_uint8_255(a uint8) uint8 { return a << 255 }
+
+//go:noinline
+func lsh_255_uint8(a uint8) uint8 { return 255 << a }
+
+//go:noinline
+func rsh_uint8_0(a uint8) uint8 { return a >> 0 }
+
+//go:noinline
+func rsh_0_uint8(a uint8) uint8 { return 0 >> a }
+
+//go:noinline
+func rsh_uint8_1(a uint8) uint8 { return a >> 1 }
+
+//go:noinline
+func rsh_1_uint8(a uint8) uint8 { return 1 >> a }
+
+//go:noinline
+func rsh_uint8_255(a uint8) uint8 { return a >> 255 }
+
+//go:noinline
+func rsh_255_uint8(a uint8) uint8 { return 255 >> a }
+
+//go:noinline
+func mod_0_uint8(a uint8) uint8 { return 0 % a }
+
+//go:noinline
+func mod_uint8_1(a uint8) uint8 { return a % 1 }
+
+//go:noinline
+func mod_1_uint8(a uint8) uint8 { return 1 % a }
+
+//go:noinline
+func mod_uint8_255(a uint8) uint8 { return a % 255 }
+
+//go:noinline
+func mod_255_uint8(a uint8) uint8 { return 255 % a }
+
+//go:noinline
+func and_uint8_0(a uint8) uint8 { return a & 0 }
+
+//go:noinline
+func and_0_uint8(a uint8) uint8 { return 0 & a }
+
+//go:noinline
+func and_uint8_1(a uint8) uint8 { return a & 1 }
+
+//go:noinline
+func and_1_uint8(a uint8) uint8 { return 1 & a }
+
+//go:noinline
+func and_uint8_255(a uint8) uint8 { return a & 255 }
+
+//go:noinline
+func and_255_uint8(a uint8) uint8 { return 255 & a }
+
+//go:noinline
+func or_uint8_0(a uint8) uint8 { return a | 0 }
+
+//go:noinline
+func or_0_uint8(a uint8) uint8 { return 0 | a }
+
+//go:noinline
+func or_uint8_1(a uint8) uint8 { return a | 1 }
+
+//go:noinline
+func or_1_uint8(a uint8) uint8 { return 1 | a }
+
+//go:noinline
+func or_uint8_255(a uint8) uint8 { return a | 255 }
+
+//go:noinline
+func or_255_uint8(a uint8) uint8 { return 255 | a }
+
+//go:noinline
+func xor_uint8_0(a uint8) uint8 { return a ^ 0 }
+
+//go:noinline
+func xor_0_uint8(a uint8) uint8 { return 0 ^ a }
+
+//go:noinline
+func xor_uint8_1(a uint8) uint8 { return a ^ 1 }
+
+//go:noinline
+func xor_1_uint8(a uint8) uint8 { return 1 ^ a }
+
+//go:noinline
+func xor_uint8_255(a uint8) uint8 { return a ^ 255 }
+
+//go:noinline
+func xor_255_uint8(a uint8) uint8 { return 255 ^ a }
+
+//go:noinline
+func add_int8_Neg128(a int8) int8 { return a + -128 }
+
+//go:noinline
+func add_Neg128_int8(a int8) int8 { return -128 + a }
+
+//go:noinline
+func add_int8_Neg127(a int8) int8 { return a + -127 }
+
+//go:noinline
+func add_Neg127_int8(a int8) int8 { return -127 + a }
+
+//go:noinline
+func add_int8_Neg1(a int8) int8 { return a + -1 }
+
+//go:noinline
+func add_Neg1_int8(a int8) int8 { return -1 + a }
+
+//go:noinline
+func add_int8_0(a int8) int8 { return a + 0 }
+
+//go:noinline
+func add_0_int8(a int8) int8 { return 0 + a }
+
+//go:noinline
+func add_int8_1(a int8) int8 { return a + 1 }
+
+//go:noinline
+func add_1_int8(a int8) int8 { return 1 + a }
+
+//go:noinline
+func add_int8_126(a int8) int8 { return a + 126 }
+
+//go:noinline
+func add_126_int8(a int8) int8 { return 126 + a }
+
+//go:noinline
+func add_int8_127(a int8) int8 { return a + 127 }
+
+//go:noinline
+func add_127_int8(a int8) int8 { return 127 + a }
+
+//go:noinline
+func sub_int8_Neg128(a int8) int8 { return a - -128 }
+
+//go:noinline
+func sub_Neg128_int8(a int8) int8 { return -128 - a }
+
+//go:noinline
+func sub_int8_Neg127(a int8) int8 { return a - -127 }
+
+//go:noinline
+func sub_Neg127_int8(a int8) int8 { return -127 - a }
+
+//go:noinline
+func sub_int8_Neg1(a int8) int8 { return a - -1 }
+
+//go:noinline
+func sub_Neg1_int8(a int8) int8 { return -1 - a }
+
+//go:noinline
+func sub_int8_0(a int8) int8 { return a - 0 }
+
+//go:noinline
+func sub_0_int8(a int8) int8 { return 0 - a }
+
+//go:noinline
+func sub_int8_1(a int8) int8 { return a - 1 }
+
+//go:noinline
+func sub_1_int8(a int8) int8 { return 1 - a }
+
+//go:noinline
+func sub_int8_126(a int8) int8 { return a - 126 }
+
+//go:noinline
+func sub_126_int8(a int8) int8 { return 126 - a }
+
+//go:noinline
+func sub_int8_127(a int8) int8 { return a - 127 }
+
+//go:noinline
+func sub_127_int8(a int8) int8 { return 127 - a }
+
+//go:noinline
+func div_int8_Neg128(a int8) int8 { return a / -128 }
+
+//go:noinline
+func div_Neg128_int8(a int8) int8 { return -128 / a }
+
+//go:noinline
+func div_int8_Neg127(a int8) int8 { return a / -127 }
+
+//go:noinline
+func div_Neg127_int8(a int8) int8 { return -127 / a }
+
+//go:noinline
+func div_int8_Neg1(a int8) int8 { return a / -1 }
+
+//go:noinline
+func div_Neg1_int8(a int8) int8 { return -1 / a }
+
+//go:noinline
+func div_0_int8(a int8) int8 { return 0 / a }
+
+//go:noinline
+func div_int8_1(a int8) int8 { return a / 1 }
+
+//go:noinline
+func div_1_int8(a int8) int8 { return 1 / a }
+
+//go:noinline
+func div_int8_126(a int8) int8 { return a / 126 }
+
+//go:noinline
+func div_126_int8(a int8) int8 { return 126 / a }
+
+//go:noinline
+func div_int8_127(a int8) int8 { return a / 127 }
+
+//go:noinline
+func div_127_int8(a int8) int8 { return 127 / a }
+
+//go:noinline
+func mul_int8_Neg128(a int8) int8 { return a * -128 }
+
+//go:noinline
+func mul_Neg128_int8(a int8) int8 { return -128 * a }
+
+//go:noinline
+func mul_int8_Neg127(a int8) int8 { return a * -127 }
+
+//go:noinline
+func mul_Neg127_int8(a int8) int8 { return -127 * a }
+
+//go:noinline
+func mul_int8_Neg1(a int8) int8 { return a * -1 }
+
+//go:noinline
+func mul_Neg1_int8(a int8) int8 { return -1 * a }
+
+//go:noinline
+func mul_int8_0(a int8) int8 { return a * 0 }
+
+//go:noinline
+func mul_0_int8(a int8) int8 { return 0 * a }
+
+//go:noinline
+func mul_int8_1(a int8) int8 { return a * 1 }
+
+//go:noinline
+func mul_1_int8(a int8) int8 { return 1 * a }
+
+//go:noinline
+func mul_int8_126(a int8) int8 { return a * 126 }
+
+//go:noinline
+func mul_126_int8(a int8) int8 { return 126 * a }
+
+//go:noinline
+func mul_int8_127(a int8) int8 { return a * 127 }
+
+//go:noinline
+func mul_127_int8(a int8) int8 { return 127 * a }
+
+//go:noinline
+func mod_int8_Neg128(a int8) int8 { return a % -128 }
+
+//go:noinline
+func mod_Neg128_int8(a int8) int8 { return -128 % a }
+
+//go:noinline
+func mod_int8_Neg127(a int8) int8 { return a % -127 }
+
+//go:noinline
+func mod_Neg127_int8(a int8) int8 { return -127 % a }
+
+//go:noinline
+func mod_int8_Neg1(a int8) int8 { return a % -1 }
+
+//go:noinline
+func mod_Neg1_int8(a int8) int8 { return -1 % a }
+
+//go:noinline
+func mod_0_int8(a int8) int8 { return 0 % a }
+
+//go:noinline
+func mod_int8_1(a int8) int8 { return a % 1 }
+
+//go:noinline
+func mod_1_int8(a int8) int8 { return 1 % a }
+
+//go:noinline
+func mod_int8_126(a int8) int8 { return a % 126 }
+
+//go:noinline
+func mod_126_int8(a int8) int8 { return 126 % a }
+
+//go:noinline
+func mod_int8_127(a int8) int8 { return a % 127 }
+
+//go:noinline
+func mod_127_int8(a int8) int8 { return 127 % a }
+
+//go:noinline
+func and_int8_Neg128(a int8) int8 { return a & -128 }
+
+//go:noinline
+func and_Neg128_int8(a int8) int8 { return -128 & a }
+
+//go:noinline
+func and_int8_Neg127(a int8) int8 { return a & -127 }
+
+//go:noinline
+func and_Neg127_int8(a int8) int8 { return -127 & a }
+
+//go:noinline
+func and_int8_Neg1(a int8) int8 { return a & -1 }
+
+//go:noinline
+func and_Neg1_int8(a int8) int8 { return -1 & a }
+
+//go:noinline
+func and_int8_0(a int8) int8 { return a & 0 }
+
+//go:noinline
+func and_0_int8(a int8) int8 { return 0 & a }
+
+//go:noinline
+func and_int8_1(a int8) int8 { return a & 1 }
+
+//go:noinline
+func and_1_int8(a int8) int8 { return 1 & a }
+
+//go:noinline
+func and_int8_126(a int8) int8 { return a & 126 }
+
+//go:noinline
+func and_126_int8(a int8) int8 { return 126 & a }
+
+//go:noinline
+func and_int8_127(a int8) int8 { return a & 127 }
+
+//go:noinline
+func and_127_int8(a int8) int8 { return 127 & a }
+
+//go:noinline
+func or_int8_Neg128(a int8) int8 { return a | -128 }
+
+//go:noinline
+func or_Neg128_int8(a int8) int8 { return -128 | a }
+
+//go:noinline
+func or_int8_Neg127(a int8) int8 { return a | -127 }
+
+//go:noinline
+func or_Neg127_int8(a int8) int8 { return -127 | a }
+
+//go:noinline
+func or_int8_Neg1(a int8) int8 { return a | -1 }
+
+//go:noinline
+func or_Neg1_int8(a int8) int8 { return -1 | a }
+
+//go:noinline
+func or_int8_0(a int8) int8 { return a | 0 }
+
+//go:noinline
+func or_0_int8(a int8) int8 { return 0 | a }
+
+//go:noinline
+func or_int8_1(a int8) int8 { return a | 1 }
+
+//go:noinline
+func or_1_int8(a int8) int8 { return 1 | a }
+
+//go:noinline
+func or_int8_126(a int8) int8 { return a | 126 }
+
+//go:noinline
+func or_126_int8(a int8) int8 { return 126 | a }
+
+//go:noinline
+func or_int8_127(a int8) int8 { return a | 127 }
+
+//go:noinline
+func or_127_int8(a int8) int8 { return 127 | a }
+
+//go:noinline
+func xor_int8_Neg128(a int8) int8 { return a ^ -128 }
+
+//go:noinline
+func xor_Neg128_int8(a int8) int8 { return -128 ^ a }
+
+//go:noinline
+func xor_int8_Neg127(a int8) int8 { return a ^ -127 }
+
+//go:noinline
+func xor_Neg127_int8(a int8) int8 { return -127 ^ a }
+
+//go:noinline
+func xor_int8_Neg1(a int8) int8 { return a ^ -1 }
+
+//go:noinline
+func xor_Neg1_int8(a int8) int8 { return -1 ^ a }
+
+//go:noinline
+func xor_int8_0(a int8) int8 { return a ^ 0 }
+
+//go:noinline
+func xor_0_int8(a int8) int8 { return 0 ^ a }
+
+//go:noinline
+func xor_int8_1(a int8) int8 { return a ^ 1 }
+
+//go:noinline
+func xor_1_int8(a int8) int8 { return 1 ^ a }
+
+//go:noinline
+func xor_int8_126(a int8) int8 { return a ^ 126 }
+
+//go:noinline
+func xor_126_int8(a int8) int8 { return 126 ^ a }
+
+//go:noinline
+func xor_int8_127(a int8) int8 { return a ^ 127 }
+
+//go:noinline
+func xor_127_int8(a int8) int8 { return 127 ^ a }
+
+type test_uint64 struct {
+ fn func(uint64) uint64
+ fnname string
+ in uint64
+ want uint64
+}
+
+var tests_uint64 = []test_uint64{
+
+ test_uint64{fn: add_0_uint64, fnname: "add_0_uint64", in: 0, want: 0},
+ test_uint64{fn: add_uint64_0, fnname: "add_uint64_0", in: 0, want: 0},
+ test_uint64{fn: add_0_uint64, fnname: "add_0_uint64", in: 1, want: 1},
+ test_uint64{fn: add_uint64_0, fnname: "add_uint64_0", in: 1, want: 1},
+ test_uint64{fn: add_0_uint64, fnname: "add_0_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: add_uint64_0, fnname: "add_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: add_0_uint64, fnname: "add_0_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: add_uint64_0, fnname: "add_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: add_0_uint64, fnname: "add_0_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: add_uint64_0, fnname: "add_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: add_1_uint64, fnname: "add_1_uint64", in: 0, want: 1},
+ test_uint64{fn: add_uint64_1, fnname: "add_uint64_1", in: 0, want: 1},
+ test_uint64{fn: add_1_uint64, fnname: "add_1_uint64", in: 1, want: 2},
+ test_uint64{fn: add_uint64_1, fnname: "add_uint64_1", in: 1, want: 2},
+ test_uint64{fn: add_1_uint64, fnname: "add_1_uint64", in: 4294967296, want: 4294967297},
+ test_uint64{fn: add_uint64_1, fnname: "add_uint64_1", in: 4294967296, want: 4294967297},
+ test_uint64{fn: add_1_uint64, fnname: "add_1_uint64", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: add_uint64_1, fnname: "add_uint64_1", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: add_1_uint64, fnname: "add_1_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: add_uint64_1, fnname: "add_uint64_1", in: 18446744073709551615, want: 0},
+ test_uint64{fn: add_4294967296_uint64, fnname: "add_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: add_uint64_4294967296, fnname: "add_uint64_4294967296", in: 0, want: 4294967296},
+ test_uint64{fn: add_4294967296_uint64, fnname: "add_4294967296_uint64", in: 1, want: 4294967297},
+ test_uint64{fn: add_uint64_4294967296, fnname: "add_uint64_4294967296", in: 1, want: 4294967297},
+ test_uint64{fn: add_4294967296_uint64, fnname: "add_4294967296_uint64", in: 4294967296, want: 8589934592},
+ test_uint64{fn: add_uint64_4294967296, fnname: "add_uint64_4294967296", in: 4294967296, want: 8589934592},
+ test_uint64{fn: add_4294967296_uint64, fnname: "add_4294967296_uint64", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: add_uint64_4294967296, fnname: "add_uint64_4294967296", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: add_4294967296_uint64, fnname: "add_4294967296_uint64", in: 18446744073709551615, want: 4294967295},
+ test_uint64{fn: add_uint64_4294967296, fnname: "add_uint64_4294967296", in: 18446744073709551615, want: 4294967295},
+ test_uint64{fn: add_9223372036854775808_uint64, fnname: "add_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: add_uint64_9223372036854775808, fnname: "add_uint64_9223372036854775808", in: 0, want: 9223372036854775808},
+ test_uint64{fn: add_9223372036854775808_uint64, fnname: "add_9223372036854775808_uint64", in: 1, want: 9223372036854775809},
+ test_uint64{fn: add_uint64_9223372036854775808, fnname: "add_uint64_9223372036854775808", in: 1, want: 9223372036854775809},
+ test_uint64{fn: add_9223372036854775808_uint64, fnname: "add_9223372036854775808_uint64", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: add_uint64_9223372036854775808, fnname: "add_uint64_9223372036854775808", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: add_9223372036854775808_uint64, fnname: "add_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: add_uint64_9223372036854775808, fnname: "add_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: add_9223372036854775808_uint64, fnname: "add_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: add_uint64_9223372036854775808, fnname: "add_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: add_18446744073709551615_uint64, fnname: "add_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: add_uint64_18446744073709551615, fnname: "add_uint64_18446744073709551615", in: 0, want: 18446744073709551615},
+ test_uint64{fn: add_18446744073709551615_uint64, fnname: "add_18446744073709551615_uint64", in: 1, want: 0},
+ test_uint64{fn: add_uint64_18446744073709551615, fnname: "add_uint64_18446744073709551615", in: 1, want: 0},
+ test_uint64{fn: add_18446744073709551615_uint64, fnname: "add_18446744073709551615_uint64", in: 4294967296, want: 4294967295},
+ test_uint64{fn: add_uint64_18446744073709551615, fnname: "add_uint64_18446744073709551615", in: 4294967296, want: 4294967295},
+ test_uint64{fn: add_18446744073709551615_uint64, fnname: "add_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: add_uint64_18446744073709551615, fnname: "add_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: add_18446744073709551615_uint64, fnname: "add_18446744073709551615_uint64", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: add_uint64_18446744073709551615, fnname: "add_uint64_18446744073709551615", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: sub_0_uint64, fnname: "sub_0_uint64", in: 0, want: 0},
+ test_uint64{fn: sub_uint64_0, fnname: "sub_uint64_0", in: 0, want: 0},
+ test_uint64{fn: sub_0_uint64, fnname: "sub_0_uint64", in: 1, want: 18446744073709551615},
+ test_uint64{fn: sub_uint64_0, fnname: "sub_uint64_0", in: 1, want: 1},
+ test_uint64{fn: sub_0_uint64, fnname: "sub_0_uint64", in: 4294967296, want: 18446744069414584320},
+ test_uint64{fn: sub_uint64_0, fnname: "sub_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: sub_0_uint64, fnname: "sub_0_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: sub_uint64_0, fnname: "sub_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: sub_0_uint64, fnname: "sub_0_uint64", in: 18446744073709551615, want: 1},
+ test_uint64{fn: sub_uint64_0, fnname: "sub_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: sub_1_uint64, fnname: "sub_1_uint64", in: 0, want: 1},
+ test_uint64{fn: sub_uint64_1, fnname: "sub_uint64_1", in: 0, want: 18446744073709551615},
+ test_uint64{fn: sub_1_uint64, fnname: "sub_1_uint64", in: 1, want: 0},
+ test_uint64{fn: sub_uint64_1, fnname: "sub_uint64_1", in: 1, want: 0},
+ test_uint64{fn: sub_1_uint64, fnname: "sub_1_uint64", in: 4294967296, want: 18446744069414584321},
+ test_uint64{fn: sub_uint64_1, fnname: "sub_uint64_1", in: 4294967296, want: 4294967295},
+ test_uint64{fn: sub_1_uint64, fnname: "sub_1_uint64", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: sub_uint64_1, fnname: "sub_uint64_1", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: sub_1_uint64, fnname: "sub_1_uint64", in: 18446744073709551615, want: 2},
+ test_uint64{fn: sub_uint64_1, fnname: "sub_uint64_1", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: sub_4294967296_uint64, fnname: "sub_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: sub_uint64_4294967296, fnname: "sub_uint64_4294967296", in: 0, want: 18446744069414584320},
+ test_uint64{fn: sub_4294967296_uint64, fnname: "sub_4294967296_uint64", in: 1, want: 4294967295},
+ test_uint64{fn: sub_uint64_4294967296, fnname: "sub_uint64_4294967296", in: 1, want: 18446744069414584321},
+ test_uint64{fn: sub_4294967296_uint64, fnname: "sub_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: sub_uint64_4294967296, fnname: "sub_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: sub_4294967296_uint64, fnname: "sub_4294967296_uint64", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: sub_uint64_4294967296, fnname: "sub_uint64_4294967296", in: 9223372036854775808, want: 9223372032559808512},
+ test_uint64{fn: sub_4294967296_uint64, fnname: "sub_4294967296_uint64", in: 18446744073709551615, want: 4294967297},
+ test_uint64{fn: sub_uint64_4294967296, fnname: "sub_uint64_4294967296", in: 18446744073709551615, want: 18446744069414584319},
+ test_uint64{fn: sub_9223372036854775808_uint64, fnname: "sub_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: sub_uint64_9223372036854775808, fnname: "sub_uint64_9223372036854775808", in: 0, want: 9223372036854775808},
+ test_uint64{fn: sub_9223372036854775808_uint64, fnname: "sub_9223372036854775808_uint64", in: 1, want: 9223372036854775807},
+ test_uint64{fn: sub_uint64_9223372036854775808, fnname: "sub_uint64_9223372036854775808", in: 1, want: 9223372036854775809},
+ test_uint64{fn: sub_9223372036854775808_uint64, fnname: "sub_9223372036854775808_uint64", in: 4294967296, want: 9223372032559808512},
+ test_uint64{fn: sub_uint64_9223372036854775808, fnname: "sub_uint64_9223372036854775808", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: sub_9223372036854775808_uint64, fnname: "sub_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: sub_uint64_9223372036854775808, fnname: "sub_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: sub_9223372036854775808_uint64, fnname: "sub_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775809},
+ test_uint64{fn: sub_uint64_9223372036854775808, fnname: "sub_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: sub_18446744073709551615_uint64, fnname: "sub_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: sub_uint64_18446744073709551615, fnname: "sub_uint64_18446744073709551615", in: 0, want: 1},
+ test_uint64{fn: sub_18446744073709551615_uint64, fnname: "sub_18446744073709551615_uint64", in: 1, want: 18446744073709551614},
+ test_uint64{fn: sub_uint64_18446744073709551615, fnname: "sub_uint64_18446744073709551615", in: 1, want: 2},
+ test_uint64{fn: sub_18446744073709551615_uint64, fnname: "sub_18446744073709551615_uint64", in: 4294967296, want: 18446744069414584319},
+ test_uint64{fn: sub_uint64_18446744073709551615, fnname: "sub_uint64_18446744073709551615", in: 4294967296, want: 4294967297},
+ test_uint64{fn: sub_18446744073709551615_uint64, fnname: "sub_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: sub_uint64_18446744073709551615, fnname: "sub_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: sub_18446744073709551615_uint64, fnname: "sub_18446744073709551615_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: sub_uint64_18446744073709551615, fnname: "sub_uint64_18446744073709551615", in: 18446744073709551615, want: 0},
+ test_uint64{fn: div_0_uint64, fnname: "div_0_uint64", in: 1, want: 0},
+ test_uint64{fn: div_0_uint64, fnname: "div_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: div_0_uint64, fnname: "div_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: div_0_uint64, fnname: "div_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: div_uint64_1, fnname: "div_uint64_1", in: 0, want: 0},
+ test_uint64{fn: div_1_uint64, fnname: "div_1_uint64", in: 1, want: 1},
+ test_uint64{fn: div_uint64_1, fnname: "div_uint64_1", in: 1, want: 1},
+ test_uint64{fn: div_1_uint64, fnname: "div_1_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: div_uint64_1, fnname: "div_uint64_1", in: 4294967296, want: 4294967296},
+ test_uint64{fn: div_1_uint64, fnname: "div_1_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: div_uint64_1, fnname: "div_uint64_1", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: div_1_uint64, fnname: "div_1_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: div_uint64_1, fnname: "div_uint64_1", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: div_uint64_4294967296, fnname: "div_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: div_4294967296_uint64, fnname: "div_4294967296_uint64", in: 1, want: 4294967296},
+ test_uint64{fn: div_uint64_4294967296, fnname: "div_uint64_4294967296", in: 1, want: 0},
+ test_uint64{fn: div_4294967296_uint64, fnname: "div_4294967296_uint64", in: 4294967296, want: 1},
+ test_uint64{fn: div_uint64_4294967296, fnname: "div_uint64_4294967296", in: 4294967296, want: 1},
+ test_uint64{fn: div_4294967296_uint64, fnname: "div_4294967296_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: div_uint64_4294967296, fnname: "div_uint64_4294967296", in: 9223372036854775808, want: 2147483648},
+ test_uint64{fn: div_4294967296_uint64, fnname: "div_4294967296_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: div_uint64_4294967296, fnname: "div_uint64_4294967296", in: 18446744073709551615, want: 4294967295},
+ test_uint64{fn: div_uint64_9223372036854775808, fnname: "div_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: div_9223372036854775808_uint64, fnname: "div_9223372036854775808_uint64", in: 1, want: 9223372036854775808},
+ test_uint64{fn: div_uint64_9223372036854775808, fnname: "div_uint64_9223372036854775808", in: 1, want: 0},
+ test_uint64{fn: div_9223372036854775808_uint64, fnname: "div_9223372036854775808_uint64", in: 4294967296, want: 2147483648},
+ test_uint64{fn: div_uint64_9223372036854775808, fnname: "div_uint64_9223372036854775808", in: 4294967296, want: 0},
+ test_uint64{fn: div_9223372036854775808_uint64, fnname: "div_9223372036854775808_uint64", in: 9223372036854775808, want: 1},
+ test_uint64{fn: div_uint64_9223372036854775808, fnname: "div_uint64_9223372036854775808", in: 9223372036854775808, want: 1},
+ test_uint64{fn: div_9223372036854775808_uint64, fnname: "div_9223372036854775808_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: div_uint64_9223372036854775808, fnname: "div_uint64_9223372036854775808", in: 18446744073709551615, want: 1},
+ test_uint64{fn: div_uint64_18446744073709551615, fnname: "div_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: div_18446744073709551615_uint64, fnname: "div_18446744073709551615_uint64", in: 1, want: 18446744073709551615},
+ test_uint64{fn: div_uint64_18446744073709551615, fnname: "div_uint64_18446744073709551615", in: 1, want: 0},
+ test_uint64{fn: div_18446744073709551615_uint64, fnname: "div_18446744073709551615_uint64", in: 4294967296, want: 4294967295},
+ test_uint64{fn: div_uint64_18446744073709551615, fnname: "div_uint64_18446744073709551615", in: 4294967296, want: 0},
+ test_uint64{fn: div_18446744073709551615_uint64, fnname: "div_18446744073709551615_uint64", in: 9223372036854775808, want: 1},
+ test_uint64{fn: div_uint64_18446744073709551615, fnname: "div_uint64_18446744073709551615", in: 9223372036854775808, want: 0},
+ test_uint64{fn: div_18446744073709551615_uint64, fnname: "div_18446744073709551615_uint64", in: 18446744073709551615, want: 1},
+ test_uint64{fn: div_uint64_18446744073709551615, fnname: "div_uint64_18446744073709551615", in: 18446744073709551615, want: 1},
+ test_uint64{fn: mul_0_uint64, fnname: "mul_0_uint64", in: 0, want: 0},
+ test_uint64{fn: mul_uint64_0, fnname: "mul_uint64_0", in: 0, want: 0},
+ test_uint64{fn: mul_0_uint64, fnname: "mul_0_uint64", in: 1, want: 0},
+ test_uint64{fn: mul_uint64_0, fnname: "mul_uint64_0", in: 1, want: 0},
+ test_uint64{fn: mul_0_uint64, fnname: "mul_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mul_uint64_0, fnname: "mul_uint64_0", in: 4294967296, want: 0},
+ test_uint64{fn: mul_0_uint64, fnname: "mul_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_uint64_0, fnname: "mul_uint64_0", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_0_uint64, fnname: "mul_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mul_uint64_0, fnname: "mul_uint64_0", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mul_1_uint64, fnname: "mul_1_uint64", in: 0, want: 0},
+ test_uint64{fn: mul_uint64_1, fnname: "mul_uint64_1", in: 0, want: 0},
+ test_uint64{fn: mul_1_uint64, fnname: "mul_1_uint64", in: 1, want: 1},
+ test_uint64{fn: mul_uint64_1, fnname: "mul_uint64_1", in: 1, want: 1},
+ test_uint64{fn: mul_1_uint64, fnname: "mul_1_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: mul_uint64_1, fnname: "mul_uint64_1", in: 4294967296, want: 4294967296},
+ test_uint64{fn: mul_1_uint64, fnname: "mul_1_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: mul_uint64_1, fnname: "mul_uint64_1", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: mul_1_uint64, fnname: "mul_1_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: mul_uint64_1, fnname: "mul_uint64_1", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: mul_4294967296_uint64, fnname: "mul_4294967296_uint64", in: 0, want: 0},
+ test_uint64{fn: mul_uint64_4294967296, fnname: "mul_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: mul_4294967296_uint64, fnname: "mul_4294967296_uint64", in: 1, want: 4294967296},
+ test_uint64{fn: mul_uint64_4294967296, fnname: "mul_uint64_4294967296", in: 1, want: 4294967296},
+ test_uint64{fn: mul_4294967296_uint64, fnname: "mul_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mul_uint64_4294967296, fnname: "mul_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: mul_4294967296_uint64, fnname: "mul_4294967296_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_uint64_4294967296, fnname: "mul_uint64_4294967296", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_4294967296_uint64, fnname: "mul_4294967296_uint64", in: 18446744073709551615, want: 18446744069414584320},
+ test_uint64{fn: mul_uint64_4294967296, fnname: "mul_uint64_4294967296", in: 18446744073709551615, want: 18446744069414584320},
+ test_uint64{fn: mul_9223372036854775808_uint64, fnname: "mul_9223372036854775808_uint64", in: 0, want: 0},
+ test_uint64{fn: mul_uint64_9223372036854775808, fnname: "mul_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: mul_9223372036854775808_uint64, fnname: "mul_9223372036854775808_uint64", in: 1, want: 9223372036854775808},
+ test_uint64{fn: mul_uint64_9223372036854775808, fnname: "mul_uint64_9223372036854775808", in: 1, want: 9223372036854775808},
+ test_uint64{fn: mul_9223372036854775808_uint64, fnname: "mul_9223372036854775808_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mul_uint64_9223372036854775808, fnname: "mul_uint64_9223372036854775808", in: 4294967296, want: 0},
+ test_uint64{fn: mul_9223372036854775808_uint64, fnname: "mul_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_uint64_9223372036854775808, fnname: "mul_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mul_9223372036854775808_uint64, fnname: "mul_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775808},
+ test_uint64{fn: mul_uint64_9223372036854775808, fnname: "mul_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775808},
+ test_uint64{fn: mul_18446744073709551615_uint64, fnname: "mul_18446744073709551615_uint64", in: 0, want: 0},
+ test_uint64{fn: mul_uint64_18446744073709551615, fnname: "mul_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: mul_18446744073709551615_uint64, fnname: "mul_18446744073709551615_uint64", in: 1, want: 18446744073709551615},
+ test_uint64{fn: mul_uint64_18446744073709551615, fnname: "mul_uint64_18446744073709551615", in: 1, want: 18446744073709551615},
+ test_uint64{fn: mul_18446744073709551615_uint64, fnname: "mul_18446744073709551615_uint64", in: 4294967296, want: 18446744069414584320},
+ test_uint64{fn: mul_uint64_18446744073709551615, fnname: "mul_uint64_18446744073709551615", in: 4294967296, want: 18446744069414584320},
+ test_uint64{fn: mul_18446744073709551615_uint64, fnname: "mul_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: mul_uint64_18446744073709551615, fnname: "mul_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: mul_18446744073709551615_uint64, fnname: "mul_18446744073709551615_uint64", in: 18446744073709551615, want: 1},
+ test_uint64{fn: mul_uint64_18446744073709551615, fnname: "mul_uint64_18446744073709551615", in: 18446744073709551615, want: 1},
+ test_uint64{fn: lsh_0_uint64, fnname: "lsh_0_uint64", in: 0, want: 0},
+ test_uint64{fn: lsh_uint64_0, fnname: "lsh_uint64_0", in: 0, want: 0},
+ test_uint64{fn: lsh_0_uint64, fnname: "lsh_0_uint64", in: 1, want: 0},
+ test_uint64{fn: lsh_uint64_0, fnname: "lsh_uint64_0", in: 1, want: 1},
+ test_uint64{fn: lsh_0_uint64, fnname: "lsh_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_uint64_0, fnname: "lsh_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: lsh_0_uint64, fnname: "lsh_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_uint64_0, fnname: "lsh_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: lsh_0_uint64, fnname: "lsh_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_uint64_0, fnname: "lsh_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: lsh_1_uint64, fnname: "lsh_1_uint64", in: 0, want: 1},
+ test_uint64{fn: lsh_uint64_1, fnname: "lsh_uint64_1", in: 0, want: 0},
+ test_uint64{fn: lsh_1_uint64, fnname: "lsh_1_uint64", in: 1, want: 2},
+ test_uint64{fn: lsh_uint64_1, fnname: "lsh_uint64_1", in: 1, want: 2},
+ test_uint64{fn: lsh_1_uint64, fnname: "lsh_1_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_uint64_1, fnname: "lsh_uint64_1", in: 4294967296, want: 8589934592},
+ test_uint64{fn: lsh_1_uint64, fnname: "lsh_1_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_uint64_1, fnname: "lsh_uint64_1", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_1_uint64, fnname: "lsh_1_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_uint64_1, fnname: "lsh_uint64_1", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: lsh_4294967296_uint64, fnname: "lsh_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: lsh_uint64_4294967296, fnname: "lsh_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: lsh_4294967296_uint64, fnname: "lsh_4294967296_uint64", in: 1, want: 8589934592},
+ test_uint64{fn: lsh_uint64_4294967296, fnname: "lsh_uint64_4294967296", in: 1, want: 0},
+ test_uint64{fn: lsh_4294967296_uint64, fnname: "lsh_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_uint64_4294967296, fnname: "lsh_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_4294967296_uint64, fnname: "lsh_4294967296_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_uint64_4294967296, fnname: "lsh_uint64_4294967296", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_4294967296_uint64, fnname: "lsh_4294967296_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_uint64_4294967296, fnname: "lsh_uint64_4294967296", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_9223372036854775808_uint64, fnname: "lsh_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: lsh_uint64_9223372036854775808, fnname: "lsh_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: lsh_9223372036854775808_uint64, fnname: "lsh_9223372036854775808_uint64", in: 1, want: 0},
+ test_uint64{fn: lsh_uint64_9223372036854775808, fnname: "lsh_uint64_9223372036854775808", in: 1, want: 0},
+ test_uint64{fn: lsh_9223372036854775808_uint64, fnname: "lsh_9223372036854775808_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_uint64_9223372036854775808, fnname: "lsh_uint64_9223372036854775808", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_9223372036854775808_uint64, fnname: "lsh_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_uint64_9223372036854775808, fnname: "lsh_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_9223372036854775808_uint64, fnname: "lsh_9223372036854775808_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_uint64_9223372036854775808, fnname: "lsh_uint64_9223372036854775808", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_18446744073709551615_uint64, fnname: "lsh_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: lsh_uint64_18446744073709551615, fnname: "lsh_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: lsh_18446744073709551615_uint64, fnname: "lsh_18446744073709551615_uint64", in: 1, want: 18446744073709551614},
+ test_uint64{fn: lsh_uint64_18446744073709551615, fnname: "lsh_uint64_18446744073709551615", in: 1, want: 0},
+ test_uint64{fn: lsh_18446744073709551615_uint64, fnname: "lsh_18446744073709551615_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_uint64_18446744073709551615, fnname: "lsh_uint64_18446744073709551615", in: 4294967296, want: 0},
+ test_uint64{fn: lsh_18446744073709551615_uint64, fnname: "lsh_18446744073709551615_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_uint64_18446744073709551615, fnname: "lsh_uint64_18446744073709551615", in: 9223372036854775808, want: 0},
+ test_uint64{fn: lsh_18446744073709551615_uint64, fnname: "lsh_18446744073709551615_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: lsh_uint64_18446744073709551615, fnname: "lsh_uint64_18446744073709551615", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_0_uint64, fnname: "rsh_0_uint64", in: 0, want: 0},
+ test_uint64{fn: rsh_uint64_0, fnname: "rsh_uint64_0", in: 0, want: 0},
+ test_uint64{fn: rsh_0_uint64, fnname: "rsh_0_uint64", in: 1, want: 0},
+ test_uint64{fn: rsh_uint64_0, fnname: "rsh_uint64_0", in: 1, want: 1},
+ test_uint64{fn: rsh_0_uint64, fnname: "rsh_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_uint64_0, fnname: "rsh_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: rsh_0_uint64, fnname: "rsh_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_uint64_0, fnname: "rsh_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: rsh_0_uint64, fnname: "rsh_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_uint64_0, fnname: "rsh_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: rsh_1_uint64, fnname: "rsh_1_uint64", in: 0, want: 1},
+ test_uint64{fn: rsh_uint64_1, fnname: "rsh_uint64_1", in: 0, want: 0},
+ test_uint64{fn: rsh_1_uint64, fnname: "rsh_1_uint64", in: 1, want: 0},
+ test_uint64{fn: rsh_uint64_1, fnname: "rsh_uint64_1", in: 1, want: 0},
+ test_uint64{fn: rsh_1_uint64, fnname: "rsh_1_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_uint64_1, fnname: "rsh_uint64_1", in: 4294967296, want: 2147483648},
+ test_uint64{fn: rsh_1_uint64, fnname: "rsh_1_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_uint64_1, fnname: "rsh_uint64_1", in: 9223372036854775808, want: 4611686018427387904},
+ test_uint64{fn: rsh_1_uint64, fnname: "rsh_1_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_uint64_1, fnname: "rsh_uint64_1", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: rsh_4294967296_uint64, fnname: "rsh_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: rsh_uint64_4294967296, fnname: "rsh_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: rsh_4294967296_uint64, fnname: "rsh_4294967296_uint64", in: 1, want: 2147483648},
+ test_uint64{fn: rsh_uint64_4294967296, fnname: "rsh_uint64_4294967296", in: 1, want: 0},
+ test_uint64{fn: rsh_4294967296_uint64, fnname: "rsh_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_uint64_4294967296, fnname: "rsh_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_4294967296_uint64, fnname: "rsh_4294967296_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_uint64_4294967296, fnname: "rsh_uint64_4294967296", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_4294967296_uint64, fnname: "rsh_4294967296_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_uint64_4294967296, fnname: "rsh_uint64_4294967296", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_9223372036854775808_uint64, fnname: "rsh_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: rsh_uint64_9223372036854775808, fnname: "rsh_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: rsh_9223372036854775808_uint64, fnname: "rsh_9223372036854775808_uint64", in: 1, want: 4611686018427387904},
+ test_uint64{fn: rsh_uint64_9223372036854775808, fnname: "rsh_uint64_9223372036854775808", in: 1, want: 0},
+ test_uint64{fn: rsh_9223372036854775808_uint64, fnname: "rsh_9223372036854775808_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_uint64_9223372036854775808, fnname: "rsh_uint64_9223372036854775808", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_9223372036854775808_uint64, fnname: "rsh_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_uint64_9223372036854775808, fnname: "rsh_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_9223372036854775808_uint64, fnname: "rsh_9223372036854775808_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_uint64_9223372036854775808, fnname: "rsh_uint64_9223372036854775808", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_18446744073709551615_uint64, fnname: "rsh_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: rsh_uint64_18446744073709551615, fnname: "rsh_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: rsh_18446744073709551615_uint64, fnname: "rsh_18446744073709551615_uint64", in: 1, want: 9223372036854775807},
+ test_uint64{fn: rsh_uint64_18446744073709551615, fnname: "rsh_uint64_18446744073709551615", in: 1, want: 0},
+ test_uint64{fn: rsh_18446744073709551615_uint64, fnname: "rsh_18446744073709551615_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_uint64_18446744073709551615, fnname: "rsh_uint64_18446744073709551615", in: 4294967296, want: 0},
+ test_uint64{fn: rsh_18446744073709551615_uint64, fnname: "rsh_18446744073709551615_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_uint64_18446744073709551615, fnname: "rsh_uint64_18446744073709551615", in: 9223372036854775808, want: 0},
+ test_uint64{fn: rsh_18446744073709551615_uint64, fnname: "rsh_18446744073709551615_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: rsh_uint64_18446744073709551615, fnname: "rsh_uint64_18446744073709551615", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mod_0_uint64, fnname: "mod_0_uint64", in: 1, want: 0},
+ test_uint64{fn: mod_0_uint64, fnname: "mod_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mod_0_uint64, fnname: "mod_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mod_0_uint64, fnname: "mod_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mod_uint64_1, fnname: "mod_uint64_1", in: 0, want: 0},
+ test_uint64{fn: mod_1_uint64, fnname: "mod_1_uint64", in: 1, want: 0},
+ test_uint64{fn: mod_uint64_1, fnname: "mod_uint64_1", in: 1, want: 0},
+ test_uint64{fn: mod_1_uint64, fnname: "mod_1_uint64", in: 4294967296, want: 1},
+ test_uint64{fn: mod_uint64_1, fnname: "mod_uint64_1", in: 4294967296, want: 0},
+ test_uint64{fn: mod_1_uint64, fnname: "mod_1_uint64", in: 9223372036854775808, want: 1},
+ test_uint64{fn: mod_uint64_1, fnname: "mod_uint64_1", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mod_1_uint64, fnname: "mod_1_uint64", in: 18446744073709551615, want: 1},
+ test_uint64{fn: mod_uint64_1, fnname: "mod_uint64_1", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mod_uint64_4294967296, fnname: "mod_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: mod_4294967296_uint64, fnname: "mod_4294967296_uint64", in: 1, want: 0},
+ test_uint64{fn: mod_uint64_4294967296, fnname: "mod_uint64_4294967296", in: 1, want: 1},
+ test_uint64{fn: mod_4294967296_uint64, fnname: "mod_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mod_uint64_4294967296, fnname: "mod_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: mod_4294967296_uint64, fnname: "mod_4294967296_uint64", in: 9223372036854775808, want: 4294967296},
+ test_uint64{fn: mod_uint64_4294967296, fnname: "mod_uint64_4294967296", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mod_4294967296_uint64, fnname: "mod_4294967296_uint64", in: 18446744073709551615, want: 4294967296},
+ test_uint64{fn: mod_uint64_4294967296, fnname: "mod_uint64_4294967296", in: 18446744073709551615, want: 4294967295},
+ test_uint64{fn: mod_uint64_9223372036854775808, fnname: "mod_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: mod_9223372036854775808_uint64, fnname: "mod_9223372036854775808_uint64", in: 1, want: 0},
+ test_uint64{fn: mod_uint64_9223372036854775808, fnname: "mod_uint64_9223372036854775808", in: 1, want: 1},
+ test_uint64{fn: mod_9223372036854775808_uint64, fnname: "mod_9223372036854775808_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: mod_uint64_9223372036854775808, fnname: "mod_uint64_9223372036854775808", in: 4294967296, want: 4294967296},
+ test_uint64{fn: mod_9223372036854775808_uint64, fnname: "mod_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mod_uint64_9223372036854775808, fnname: "mod_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: mod_9223372036854775808_uint64, fnname: "mod_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775808},
+ test_uint64{fn: mod_uint64_9223372036854775808, fnname: "mod_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: mod_uint64_18446744073709551615, fnname: "mod_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: mod_18446744073709551615_uint64, fnname: "mod_18446744073709551615_uint64", in: 1, want: 0},
+ test_uint64{fn: mod_uint64_18446744073709551615, fnname: "mod_uint64_18446744073709551615", in: 1, want: 1},
+ test_uint64{fn: mod_18446744073709551615_uint64, fnname: "mod_18446744073709551615_uint64", in: 4294967296, want: 4294967295},
+ test_uint64{fn: mod_uint64_18446744073709551615, fnname: "mod_uint64_18446744073709551615", in: 4294967296, want: 4294967296},
+ test_uint64{fn: mod_18446744073709551615_uint64, fnname: "mod_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: mod_uint64_18446744073709551615, fnname: "mod_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: mod_18446744073709551615_uint64, fnname: "mod_18446744073709551615_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: mod_uint64_18446744073709551615, fnname: "mod_uint64_18446744073709551615", in: 18446744073709551615, want: 0},
+ test_uint64{fn: and_0_uint64, fnname: "and_0_uint64", in: 0, want: 0},
+ test_uint64{fn: and_uint64_0, fnname: "and_uint64_0", in: 0, want: 0},
+ test_uint64{fn: and_0_uint64, fnname: "and_0_uint64", in: 1, want: 0},
+ test_uint64{fn: and_uint64_0, fnname: "and_uint64_0", in: 1, want: 0},
+ test_uint64{fn: and_0_uint64, fnname: "and_0_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: and_uint64_0, fnname: "and_uint64_0", in: 4294967296, want: 0},
+ test_uint64{fn: and_0_uint64, fnname: "and_0_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_uint64_0, fnname: "and_uint64_0", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_0_uint64, fnname: "and_0_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: and_uint64_0, fnname: "and_uint64_0", in: 18446744073709551615, want: 0},
+ test_uint64{fn: and_1_uint64, fnname: "and_1_uint64", in: 0, want: 0},
+ test_uint64{fn: and_uint64_1, fnname: "and_uint64_1", in: 0, want: 0},
+ test_uint64{fn: and_1_uint64, fnname: "and_1_uint64", in: 1, want: 1},
+ test_uint64{fn: and_uint64_1, fnname: "and_uint64_1", in: 1, want: 1},
+ test_uint64{fn: and_1_uint64, fnname: "and_1_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: and_uint64_1, fnname: "and_uint64_1", in: 4294967296, want: 0},
+ test_uint64{fn: and_1_uint64, fnname: "and_1_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_uint64_1, fnname: "and_uint64_1", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_1_uint64, fnname: "and_1_uint64", in: 18446744073709551615, want: 1},
+ test_uint64{fn: and_uint64_1, fnname: "and_uint64_1", in: 18446744073709551615, want: 1},
+ test_uint64{fn: and_4294967296_uint64, fnname: "and_4294967296_uint64", in: 0, want: 0},
+ test_uint64{fn: and_uint64_4294967296, fnname: "and_uint64_4294967296", in: 0, want: 0},
+ test_uint64{fn: and_4294967296_uint64, fnname: "and_4294967296_uint64", in: 1, want: 0},
+ test_uint64{fn: and_uint64_4294967296, fnname: "and_uint64_4294967296", in: 1, want: 0},
+ test_uint64{fn: and_4294967296_uint64, fnname: "and_4294967296_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: and_uint64_4294967296, fnname: "and_uint64_4294967296", in: 4294967296, want: 4294967296},
+ test_uint64{fn: and_4294967296_uint64, fnname: "and_4294967296_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_uint64_4294967296, fnname: "and_uint64_4294967296", in: 9223372036854775808, want: 0},
+ test_uint64{fn: and_4294967296_uint64, fnname: "and_4294967296_uint64", in: 18446744073709551615, want: 4294967296},
+ test_uint64{fn: and_uint64_4294967296, fnname: "and_uint64_4294967296", in: 18446744073709551615, want: 4294967296},
+ test_uint64{fn: and_9223372036854775808_uint64, fnname: "and_9223372036854775808_uint64", in: 0, want: 0},
+ test_uint64{fn: and_uint64_9223372036854775808, fnname: "and_uint64_9223372036854775808", in: 0, want: 0},
+ test_uint64{fn: and_9223372036854775808_uint64, fnname: "and_9223372036854775808_uint64", in: 1, want: 0},
+ test_uint64{fn: and_uint64_9223372036854775808, fnname: "and_uint64_9223372036854775808", in: 1, want: 0},
+ test_uint64{fn: and_9223372036854775808_uint64, fnname: "and_9223372036854775808_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: and_uint64_9223372036854775808, fnname: "and_uint64_9223372036854775808", in: 4294967296, want: 0},
+ test_uint64{fn: and_9223372036854775808_uint64, fnname: "and_9223372036854775808_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: and_uint64_9223372036854775808, fnname: "and_uint64_9223372036854775808", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: and_9223372036854775808_uint64, fnname: "and_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775808},
+ test_uint64{fn: and_uint64_9223372036854775808, fnname: "and_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775808},
+ test_uint64{fn: and_18446744073709551615_uint64, fnname: "and_18446744073709551615_uint64", in: 0, want: 0},
+ test_uint64{fn: and_uint64_18446744073709551615, fnname: "and_uint64_18446744073709551615", in: 0, want: 0},
+ test_uint64{fn: and_18446744073709551615_uint64, fnname: "and_18446744073709551615_uint64", in: 1, want: 1},
+ test_uint64{fn: and_uint64_18446744073709551615, fnname: "and_uint64_18446744073709551615", in: 1, want: 1},
+ test_uint64{fn: and_18446744073709551615_uint64, fnname: "and_18446744073709551615_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: and_uint64_18446744073709551615, fnname: "and_uint64_18446744073709551615", in: 4294967296, want: 4294967296},
+ test_uint64{fn: and_18446744073709551615_uint64, fnname: "and_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: and_uint64_18446744073709551615, fnname: "and_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: and_18446744073709551615_uint64, fnname: "and_18446744073709551615_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: and_uint64_18446744073709551615, fnname: "and_uint64_18446744073709551615", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_0_uint64, fnname: "or_0_uint64", in: 0, want: 0},
+ test_uint64{fn: or_uint64_0, fnname: "or_uint64_0", in: 0, want: 0},
+ test_uint64{fn: or_0_uint64, fnname: "or_0_uint64", in: 1, want: 1},
+ test_uint64{fn: or_uint64_0, fnname: "or_uint64_0", in: 1, want: 1},
+ test_uint64{fn: or_0_uint64, fnname: "or_0_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: or_uint64_0, fnname: "or_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: or_0_uint64, fnname: "or_0_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: or_uint64_0, fnname: "or_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: or_0_uint64, fnname: "or_0_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_0, fnname: "or_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_1_uint64, fnname: "or_1_uint64", in: 0, want: 1},
+ test_uint64{fn: or_uint64_1, fnname: "or_uint64_1", in: 0, want: 1},
+ test_uint64{fn: or_1_uint64, fnname: "or_1_uint64", in: 1, want: 1},
+ test_uint64{fn: or_uint64_1, fnname: "or_uint64_1", in: 1, want: 1},
+ test_uint64{fn: or_1_uint64, fnname: "or_1_uint64", in: 4294967296, want: 4294967297},
+ test_uint64{fn: or_uint64_1, fnname: "or_uint64_1", in: 4294967296, want: 4294967297},
+ test_uint64{fn: or_1_uint64, fnname: "or_1_uint64", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: or_uint64_1, fnname: "or_uint64_1", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: or_1_uint64, fnname: "or_1_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_1, fnname: "or_uint64_1", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_4294967296_uint64, fnname: "or_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: or_uint64_4294967296, fnname: "or_uint64_4294967296", in: 0, want: 4294967296},
+ test_uint64{fn: or_4294967296_uint64, fnname: "or_4294967296_uint64", in: 1, want: 4294967297},
+ test_uint64{fn: or_uint64_4294967296, fnname: "or_uint64_4294967296", in: 1, want: 4294967297},
+ test_uint64{fn: or_4294967296_uint64, fnname: "or_4294967296_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: or_uint64_4294967296, fnname: "or_uint64_4294967296", in: 4294967296, want: 4294967296},
+ test_uint64{fn: or_4294967296_uint64, fnname: "or_4294967296_uint64", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: or_uint64_4294967296, fnname: "or_uint64_4294967296", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: or_4294967296_uint64, fnname: "or_4294967296_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_4294967296, fnname: "or_uint64_4294967296", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_9223372036854775808_uint64, fnname: "or_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: or_uint64_9223372036854775808, fnname: "or_uint64_9223372036854775808", in: 0, want: 9223372036854775808},
+ test_uint64{fn: or_9223372036854775808_uint64, fnname: "or_9223372036854775808_uint64", in: 1, want: 9223372036854775809},
+ test_uint64{fn: or_uint64_9223372036854775808, fnname: "or_uint64_9223372036854775808", in: 1, want: 9223372036854775809},
+ test_uint64{fn: or_9223372036854775808_uint64, fnname: "or_9223372036854775808_uint64", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: or_uint64_9223372036854775808, fnname: "or_uint64_9223372036854775808", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: or_9223372036854775808_uint64, fnname: "or_9223372036854775808_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: or_uint64_9223372036854775808, fnname: "or_uint64_9223372036854775808", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: or_9223372036854775808_uint64, fnname: "or_9223372036854775808_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_9223372036854775808, fnname: "or_uint64_9223372036854775808", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_18446744073709551615_uint64, fnname: "or_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_18446744073709551615, fnname: "or_uint64_18446744073709551615", in: 0, want: 18446744073709551615},
+ test_uint64{fn: or_18446744073709551615_uint64, fnname: "or_18446744073709551615_uint64", in: 1, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_18446744073709551615, fnname: "or_uint64_18446744073709551615", in: 1, want: 18446744073709551615},
+ test_uint64{fn: or_18446744073709551615_uint64, fnname: "or_18446744073709551615_uint64", in: 4294967296, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_18446744073709551615, fnname: "or_uint64_18446744073709551615", in: 4294967296, want: 18446744073709551615},
+ test_uint64{fn: or_18446744073709551615_uint64, fnname: "or_18446744073709551615_uint64", in: 9223372036854775808, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_18446744073709551615, fnname: "or_uint64_18446744073709551615", in: 9223372036854775808, want: 18446744073709551615},
+ test_uint64{fn: or_18446744073709551615_uint64, fnname: "or_18446744073709551615_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: or_uint64_18446744073709551615, fnname: "or_uint64_18446744073709551615", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: xor_0_uint64, fnname: "xor_0_uint64", in: 0, want: 0},
+ test_uint64{fn: xor_uint64_0, fnname: "xor_uint64_0", in: 0, want: 0},
+ test_uint64{fn: xor_0_uint64, fnname: "xor_0_uint64", in: 1, want: 1},
+ test_uint64{fn: xor_uint64_0, fnname: "xor_uint64_0", in: 1, want: 1},
+ test_uint64{fn: xor_0_uint64, fnname: "xor_0_uint64", in: 4294967296, want: 4294967296},
+ test_uint64{fn: xor_uint64_0, fnname: "xor_uint64_0", in: 4294967296, want: 4294967296},
+ test_uint64{fn: xor_0_uint64, fnname: "xor_0_uint64", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: xor_uint64_0, fnname: "xor_uint64_0", in: 9223372036854775808, want: 9223372036854775808},
+ test_uint64{fn: xor_0_uint64, fnname: "xor_0_uint64", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: xor_uint64_0, fnname: "xor_uint64_0", in: 18446744073709551615, want: 18446744073709551615},
+ test_uint64{fn: xor_1_uint64, fnname: "xor_1_uint64", in: 0, want: 1},
+ test_uint64{fn: xor_uint64_1, fnname: "xor_uint64_1", in: 0, want: 1},
+ test_uint64{fn: xor_1_uint64, fnname: "xor_1_uint64", in: 1, want: 0},
+ test_uint64{fn: xor_uint64_1, fnname: "xor_uint64_1", in: 1, want: 0},
+ test_uint64{fn: xor_1_uint64, fnname: "xor_1_uint64", in: 4294967296, want: 4294967297},
+ test_uint64{fn: xor_uint64_1, fnname: "xor_uint64_1", in: 4294967296, want: 4294967297},
+ test_uint64{fn: xor_1_uint64, fnname: "xor_1_uint64", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: xor_uint64_1, fnname: "xor_uint64_1", in: 9223372036854775808, want: 9223372036854775809},
+ test_uint64{fn: xor_1_uint64, fnname: "xor_1_uint64", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: xor_uint64_1, fnname: "xor_uint64_1", in: 18446744073709551615, want: 18446744073709551614},
+ test_uint64{fn: xor_4294967296_uint64, fnname: "xor_4294967296_uint64", in: 0, want: 4294967296},
+ test_uint64{fn: xor_uint64_4294967296, fnname: "xor_uint64_4294967296", in: 0, want: 4294967296},
+ test_uint64{fn: xor_4294967296_uint64, fnname: "xor_4294967296_uint64", in: 1, want: 4294967297},
+ test_uint64{fn: xor_uint64_4294967296, fnname: "xor_uint64_4294967296", in: 1, want: 4294967297},
+ test_uint64{fn: xor_4294967296_uint64, fnname: "xor_4294967296_uint64", in: 4294967296, want: 0},
+ test_uint64{fn: xor_uint64_4294967296, fnname: "xor_uint64_4294967296", in: 4294967296, want: 0},
+ test_uint64{fn: xor_4294967296_uint64, fnname: "xor_4294967296_uint64", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: xor_uint64_4294967296, fnname: "xor_uint64_4294967296", in: 9223372036854775808, want: 9223372041149743104},
+ test_uint64{fn: xor_4294967296_uint64, fnname: "xor_4294967296_uint64", in: 18446744073709551615, want: 18446744069414584319},
+ test_uint64{fn: xor_uint64_4294967296, fnname: "xor_uint64_4294967296", in: 18446744073709551615, want: 18446744069414584319},
+ test_uint64{fn: xor_9223372036854775808_uint64, fnname: "xor_9223372036854775808_uint64", in: 0, want: 9223372036854775808},
+ test_uint64{fn: xor_uint64_9223372036854775808, fnname: "xor_uint64_9223372036854775808", in: 0, want: 9223372036854775808},
+ test_uint64{fn: xor_9223372036854775808_uint64, fnname: "xor_9223372036854775808_uint64", in: 1, want: 9223372036854775809},
+ test_uint64{fn: xor_uint64_9223372036854775808, fnname: "xor_uint64_9223372036854775808", in: 1, want: 9223372036854775809},
+ test_uint64{fn: xor_9223372036854775808_uint64, fnname: "xor_9223372036854775808_uint64", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: xor_uint64_9223372036854775808, fnname: "xor_uint64_9223372036854775808", in: 4294967296, want: 9223372041149743104},
+ test_uint64{fn: xor_9223372036854775808_uint64, fnname: "xor_9223372036854775808_uint64", in: 9223372036854775808, want: 0},
+ test_uint64{fn: xor_uint64_9223372036854775808, fnname: "xor_uint64_9223372036854775808", in: 9223372036854775808, want: 0},
+ test_uint64{fn: xor_9223372036854775808_uint64, fnname: "xor_9223372036854775808_uint64", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: xor_uint64_9223372036854775808, fnname: "xor_uint64_9223372036854775808", in: 18446744073709551615, want: 9223372036854775807},
+ test_uint64{fn: xor_18446744073709551615_uint64, fnname: "xor_18446744073709551615_uint64", in: 0, want: 18446744073709551615},
+ test_uint64{fn: xor_uint64_18446744073709551615, fnname: "xor_uint64_18446744073709551615", in: 0, want: 18446744073709551615},
+ test_uint64{fn: xor_18446744073709551615_uint64, fnname: "xor_18446744073709551615_uint64", in: 1, want: 18446744073709551614},
+ test_uint64{fn: xor_uint64_18446744073709551615, fnname: "xor_uint64_18446744073709551615", in: 1, want: 18446744073709551614},
+ test_uint64{fn: xor_18446744073709551615_uint64, fnname: "xor_18446744073709551615_uint64", in: 4294967296, want: 18446744069414584319},
+ test_uint64{fn: xor_uint64_18446744073709551615, fnname: "xor_uint64_18446744073709551615", in: 4294967296, want: 18446744069414584319},
+ test_uint64{fn: xor_18446744073709551615_uint64, fnname: "xor_18446744073709551615_uint64", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: xor_uint64_18446744073709551615, fnname: "xor_uint64_18446744073709551615", in: 9223372036854775808, want: 9223372036854775807},
+ test_uint64{fn: xor_18446744073709551615_uint64, fnname: "xor_18446744073709551615_uint64", in: 18446744073709551615, want: 0},
+ test_uint64{fn: xor_uint64_18446744073709551615, fnname: "xor_uint64_18446744073709551615", in: 18446744073709551615, want: 0}}
+
+type test_uint64mul struct {
+ fn func(uint64) uint64
+ fnname string
+ in uint64
+ want uint64
+}
+
+var tests_uint64mul = []test_uint64{
+
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 3, want: 9},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 3, want: 9},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 5, want: 15},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 5, want: 15},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 7, want: 21},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 7, want: 21},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 9, want: 27},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 9, want: 27},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 10, want: 30},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 10, want: 30},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 11, want: 33},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 11, want: 33},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 13, want: 39},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 13, want: 39},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 19, want: 57},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 19, want: 57},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 21, want: 63},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 21, want: 63},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 25, want: 75},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 25, want: 75},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 27, want: 81},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 27, want: 81},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 37, want: 111},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 37, want: 111},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 41, want: 123},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 41, want: 123},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 45, want: 135},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 45, want: 135},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 73, want: 219},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 73, want: 219},
+ test_uint64{fn: mul_3_uint64, fnname: "mul_3_uint64", in: 81, want: 243},
+ test_uint64{fn: mul_uint64_3, fnname: "mul_uint64_3", in: 81, want: 243},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 3, want: 15},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 3, want: 15},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 5, want: 25},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 5, want: 25},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 7, want: 35},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 7, want: 35},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 9, want: 45},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 9, want: 45},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 10, want: 50},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 10, want: 50},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 11, want: 55},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 11, want: 55},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 13, want: 65},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 13, want: 65},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 19, want: 95},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 19, want: 95},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 21, want: 105},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 21, want: 105},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 25, want: 125},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 25, want: 125},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 27, want: 135},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 27, want: 135},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 37, want: 185},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 37, want: 185},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 41, want: 205},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 41, want: 205},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 45, want: 225},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 45, want: 225},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 73, want: 365},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 73, want: 365},
+ test_uint64{fn: mul_5_uint64, fnname: "mul_5_uint64", in: 81, want: 405},
+ test_uint64{fn: mul_uint64_5, fnname: "mul_uint64_5", in: 81, want: 405},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 3, want: 21},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 3, want: 21},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 5, want: 35},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 5, want: 35},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 7, want: 49},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 7, want: 49},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 9, want: 63},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 9, want: 63},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 10, want: 70},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 10, want: 70},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 11, want: 77},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 11, want: 77},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 13, want: 91},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 13, want: 91},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 19, want: 133},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 19, want: 133},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 21, want: 147},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 21, want: 147},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 25, want: 175},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 25, want: 175},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 27, want: 189},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 27, want: 189},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 37, want: 259},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 37, want: 259},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 41, want: 287},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 41, want: 287},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 45, want: 315},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 45, want: 315},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 73, want: 511},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 73, want: 511},
+ test_uint64{fn: mul_7_uint64, fnname: "mul_7_uint64", in: 81, want: 567},
+ test_uint64{fn: mul_uint64_7, fnname: "mul_uint64_7", in: 81, want: 567},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 3, want: 27},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 3, want: 27},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 5, want: 45},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 5, want: 45},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 7, want: 63},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 7, want: 63},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 9, want: 81},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 9, want: 81},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 10, want: 90},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 10, want: 90},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 11, want: 99},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 11, want: 99},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 13, want: 117},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 13, want: 117},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 19, want: 171},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 19, want: 171},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 21, want: 189},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 21, want: 189},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 25, want: 225},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 25, want: 225},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 27, want: 243},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 27, want: 243},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 37, want: 333},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 37, want: 333},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 41, want: 369},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 41, want: 369},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 45, want: 405},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 45, want: 405},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 73, want: 657},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 73, want: 657},
+ test_uint64{fn: mul_9_uint64, fnname: "mul_9_uint64", in: 81, want: 729},
+ test_uint64{fn: mul_uint64_9, fnname: "mul_uint64_9", in: 81, want: 729},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 3, want: 30},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 3, want: 30},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 5, want: 50},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 5, want: 50},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 7, want: 70},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 7, want: 70},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 9, want: 90},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 9, want: 90},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 10, want: 100},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 10, want: 100},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 11, want: 110},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 11, want: 110},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 13, want: 130},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 13, want: 130},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 19, want: 190},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 19, want: 190},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 21, want: 210},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 21, want: 210},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 25, want: 250},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 25, want: 250},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 27, want: 270},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 27, want: 270},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 37, want: 370},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 37, want: 370},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 41, want: 410},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 41, want: 410},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 45, want: 450},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 45, want: 450},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 73, want: 730},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 73, want: 730},
+ test_uint64{fn: mul_10_uint64, fnname: "mul_10_uint64", in: 81, want: 810},
+ test_uint64{fn: mul_uint64_10, fnname: "mul_uint64_10", in: 81, want: 810},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 3, want: 33},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 3, want: 33},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 5, want: 55},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 5, want: 55},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 7, want: 77},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 7, want: 77},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 9, want: 99},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 9, want: 99},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 10, want: 110},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 10, want: 110},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 11, want: 121},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 11, want: 121},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 13, want: 143},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 13, want: 143},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 19, want: 209},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 19, want: 209},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 21, want: 231},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 21, want: 231},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 25, want: 275},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 25, want: 275},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 27, want: 297},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 27, want: 297},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 37, want: 407},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 37, want: 407},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 41, want: 451},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 41, want: 451},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 45, want: 495},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 45, want: 495},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 73, want: 803},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 73, want: 803},
+ test_uint64{fn: mul_11_uint64, fnname: "mul_11_uint64", in: 81, want: 891},
+ test_uint64{fn: mul_uint64_11, fnname: "mul_uint64_11", in: 81, want: 891},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 3, want: 39},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 3, want: 39},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 5, want: 65},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 5, want: 65},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 7, want: 91},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 7, want: 91},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 9, want: 117},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 9, want: 117},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 10, want: 130},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 10, want: 130},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 11, want: 143},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 11, want: 143},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 13, want: 169},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 13, want: 169},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 19, want: 247},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 19, want: 247},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 21, want: 273},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 21, want: 273},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 25, want: 325},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 25, want: 325},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 27, want: 351},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 27, want: 351},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 37, want: 481},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 37, want: 481},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 41, want: 533},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 41, want: 533},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 45, want: 585},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 45, want: 585},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 73, want: 949},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 73, want: 949},
+ test_uint64{fn: mul_13_uint64, fnname: "mul_13_uint64", in: 81, want: 1053},
+ test_uint64{fn: mul_uint64_13, fnname: "mul_uint64_13", in: 81, want: 1053},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 3, want: 57},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 3, want: 57},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 5, want: 95},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 5, want: 95},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 7, want: 133},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 7, want: 133},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 9, want: 171},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 9, want: 171},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 10, want: 190},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 10, want: 190},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 11, want: 209},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 11, want: 209},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 13, want: 247},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 13, want: 247},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 19, want: 361},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 19, want: 361},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 21, want: 399},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 21, want: 399},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 25, want: 475},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 25, want: 475},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 27, want: 513},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 27, want: 513},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 37, want: 703},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 37, want: 703},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 41, want: 779},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 41, want: 779},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 45, want: 855},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 45, want: 855},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 73, want: 1387},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 73, want: 1387},
+ test_uint64{fn: mul_19_uint64, fnname: "mul_19_uint64", in: 81, want: 1539},
+ test_uint64{fn: mul_uint64_19, fnname: "mul_uint64_19", in: 81, want: 1539},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 3, want: 63},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 3, want: 63},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 5, want: 105},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 5, want: 105},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 7, want: 147},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 7, want: 147},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 9, want: 189},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 9, want: 189},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 10, want: 210},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 10, want: 210},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 11, want: 231},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 11, want: 231},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 13, want: 273},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 13, want: 273},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 19, want: 399},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 19, want: 399},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 21, want: 441},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 21, want: 441},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 25, want: 525},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 25, want: 525},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 27, want: 567},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 27, want: 567},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 37, want: 777},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 37, want: 777},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 41, want: 861},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 41, want: 861},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 45, want: 945},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 45, want: 945},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 73, want: 1533},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 73, want: 1533},
+ test_uint64{fn: mul_21_uint64, fnname: "mul_21_uint64", in: 81, want: 1701},
+ test_uint64{fn: mul_uint64_21, fnname: "mul_uint64_21", in: 81, want: 1701},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 3, want: 75},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 3, want: 75},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 5, want: 125},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 5, want: 125},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 7, want: 175},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 7, want: 175},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 9, want: 225},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 9, want: 225},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 10, want: 250},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 10, want: 250},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 11, want: 275},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 11, want: 275},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 13, want: 325},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 13, want: 325},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 19, want: 475},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 19, want: 475},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 21, want: 525},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 21, want: 525},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 25, want: 625},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 25, want: 625},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 27, want: 675},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 27, want: 675},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 37, want: 925},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 37, want: 925},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 41, want: 1025},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 41, want: 1025},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 45, want: 1125},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 45, want: 1125},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 73, want: 1825},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 73, want: 1825},
+ test_uint64{fn: mul_25_uint64, fnname: "mul_25_uint64", in: 81, want: 2025},
+ test_uint64{fn: mul_uint64_25, fnname: "mul_uint64_25", in: 81, want: 2025},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 3, want: 81},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 3, want: 81},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 5, want: 135},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 5, want: 135},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 7, want: 189},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 7, want: 189},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 9, want: 243},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 9, want: 243},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 10, want: 270},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 10, want: 270},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 11, want: 297},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 11, want: 297},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 13, want: 351},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 13, want: 351},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 19, want: 513},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 19, want: 513},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 21, want: 567},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 21, want: 567},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 25, want: 675},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 25, want: 675},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 27, want: 729},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 27, want: 729},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 37, want: 999},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 37, want: 999},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 41, want: 1107},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 41, want: 1107},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 45, want: 1215},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 45, want: 1215},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 73, want: 1971},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 73, want: 1971},
+ test_uint64{fn: mul_27_uint64, fnname: "mul_27_uint64", in: 81, want: 2187},
+ test_uint64{fn: mul_uint64_27, fnname: "mul_uint64_27", in: 81, want: 2187},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 3, want: 111},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 3, want: 111},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 5, want: 185},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 5, want: 185},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 7, want: 259},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 7, want: 259},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 9, want: 333},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 9, want: 333},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 10, want: 370},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 10, want: 370},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 11, want: 407},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 11, want: 407},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 13, want: 481},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 13, want: 481},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 19, want: 703},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 19, want: 703},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 21, want: 777},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 21, want: 777},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 25, want: 925},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 25, want: 925},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 27, want: 999},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 27, want: 999},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 37, want: 1369},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 37, want: 1369},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 41, want: 1517},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 41, want: 1517},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 45, want: 1665},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 45, want: 1665},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 73, want: 2701},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 73, want: 2701},
+ test_uint64{fn: mul_37_uint64, fnname: "mul_37_uint64", in: 81, want: 2997},
+ test_uint64{fn: mul_uint64_37, fnname: "mul_uint64_37", in: 81, want: 2997},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 3, want: 123},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 3, want: 123},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 5, want: 205},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 5, want: 205},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 7, want: 287},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 7, want: 287},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 9, want: 369},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 9, want: 369},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 10, want: 410},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 10, want: 410},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 11, want: 451},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 11, want: 451},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 13, want: 533},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 13, want: 533},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 19, want: 779},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 19, want: 779},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 21, want: 861},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 21, want: 861},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 25, want: 1025},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 25, want: 1025},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 27, want: 1107},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 27, want: 1107},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 37, want: 1517},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 37, want: 1517},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 41, want: 1681},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 41, want: 1681},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 45, want: 1845},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 45, want: 1845},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 73, want: 2993},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 73, want: 2993},
+ test_uint64{fn: mul_41_uint64, fnname: "mul_41_uint64", in: 81, want: 3321},
+ test_uint64{fn: mul_uint64_41, fnname: "mul_uint64_41", in: 81, want: 3321},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 3, want: 135},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 3, want: 135},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 5, want: 225},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 5, want: 225},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 7, want: 315},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 7, want: 315},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 9, want: 405},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 9, want: 405},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 10, want: 450},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 10, want: 450},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 11, want: 495},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 11, want: 495},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 13, want: 585},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 13, want: 585},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 19, want: 855},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 19, want: 855},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 21, want: 945},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 21, want: 945},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 25, want: 1125},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 25, want: 1125},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 27, want: 1215},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 27, want: 1215},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 37, want: 1665},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 37, want: 1665},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 41, want: 1845},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 41, want: 1845},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 45, want: 2025},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 45, want: 2025},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 73, want: 3285},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 73, want: 3285},
+ test_uint64{fn: mul_45_uint64, fnname: "mul_45_uint64", in: 81, want: 3645},
+ test_uint64{fn: mul_uint64_45, fnname: "mul_uint64_45", in: 81, want: 3645},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 3, want: 219},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 3, want: 219},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 5, want: 365},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 5, want: 365},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 7, want: 511},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 7, want: 511},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 9, want: 657},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 9, want: 657},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 10, want: 730},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 10, want: 730},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 11, want: 803},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 11, want: 803},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 13, want: 949},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 13, want: 949},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 19, want: 1387},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 19, want: 1387},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 21, want: 1533},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 21, want: 1533},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 25, want: 1825},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 25, want: 1825},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 27, want: 1971},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 27, want: 1971},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 37, want: 2701},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 37, want: 2701},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 41, want: 2993},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 41, want: 2993},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 45, want: 3285},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 45, want: 3285},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 73, want: 5329},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 73, want: 5329},
+ test_uint64{fn: mul_73_uint64, fnname: "mul_73_uint64", in: 81, want: 5913},
+ test_uint64{fn: mul_uint64_73, fnname: "mul_uint64_73", in: 81, want: 5913},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 3, want: 243},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 3, want: 243},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 5, want: 405},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 5, want: 405},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 7, want: 567},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 7, want: 567},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 9, want: 729},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 9, want: 729},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 10, want: 810},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 10, want: 810},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 11, want: 891},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 11, want: 891},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 13, want: 1053},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 13, want: 1053},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 19, want: 1539},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 19, want: 1539},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 21, want: 1701},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 21, want: 1701},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 25, want: 2025},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 25, want: 2025},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 27, want: 2187},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 27, want: 2187},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 37, want: 2997},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 37, want: 2997},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 41, want: 3321},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 41, want: 3321},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 45, want: 3645},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 45, want: 3645},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 73, want: 5913},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 73, want: 5913},
+ test_uint64{fn: mul_81_uint64, fnname: "mul_81_uint64", in: 81, want: 6561},
+ test_uint64{fn: mul_uint64_81, fnname: "mul_uint64_81", in: 81, want: 6561}}
+
+type test_int64 struct {
+ fn func(int64) int64
+ fnname string
+ in int64
+ want int64
+}
+
+var tests_int64 = []test_int64{
+
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: -9223372036854775808, want: 0},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: -9223372036854775807, want: 1},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: -1, want: 9223372036854775807},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: 0, want: -9223372036854775808},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: 0, want: -9223372036854775808},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: 1, want: -9223372036854775807},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: 9223372036854775806, want: -2},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: 9223372036854775806, want: -2},
+ test_int64{fn: add_Neg9223372036854775808_int64, fnname: "add_Neg9223372036854775808_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: add_int64_Neg9223372036854775808, fnname: "add_int64_Neg9223372036854775808", in: 9223372036854775807, want: -1},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: -9223372036854775808, want: 1},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: -9223372036854775808, want: 1},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: -9223372036854775807, want: 2},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: -9223372036854775807, want: 2},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: -4294967296, want: 9223372032559808513},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: -4294967296, want: 9223372032559808513},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: -1, want: -9223372036854775808},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: 0, want: -9223372036854775807},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: 0, want: -9223372036854775807},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: 1, want: -9223372036854775806},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: 1, want: -9223372036854775806},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: 9223372036854775806, want: -1},
+ test_int64{fn: add_Neg9223372036854775807_int64, fnname: "add_Neg9223372036854775807_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: add_int64_Neg9223372036854775807, fnname: "add_int64_Neg9223372036854775807", in: 9223372036854775807, want: 0},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: -9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: -9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: -4294967296, want: -8589934592},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: -4294967296, want: -8589934592},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: -1, want: -4294967297},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: -1, want: -4294967297},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: 0, want: -4294967296},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: 0, want: -4294967296},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: 1, want: -4294967295},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: 1, want: -4294967295},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: 4294967296, want: 0},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: 9223372036854775806, want: 9223372032559808510},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: 9223372036854775806, want: 9223372032559808510},
+ test_int64{fn: add_Neg4294967296_int64, fnname: "add_Neg4294967296_int64", in: 9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: add_int64_Neg4294967296, fnname: "add_int64_Neg4294967296", in: 9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: -4294967296, want: -4294967297},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: -4294967296, want: -4294967297},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: -1, want: -2},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: -1, want: -2},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: 0, want: -1},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: 0, want: -1},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: 1, want: 0},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: 1, want: 0},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: 4294967296, want: 4294967295},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: 4294967296, want: 4294967295},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: 9223372036854775806, want: 9223372036854775805},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: 9223372036854775806, want: 9223372036854775805},
+ test_int64{fn: add_Neg1_int64, fnname: "add_Neg1_int64", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: add_int64_Neg1, fnname: "add_int64_Neg1", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: -4294967296, want: -4294967296},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: -1, want: -1},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: -1, want: -1},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: 0, want: 0},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: 0, want: 0},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: 1, want: 1},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: 1, want: 1},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: 4294967296, want: 4294967296},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: add_0_int64, fnname: "add_0_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: add_int64_0, fnname: "add_int64_0", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: -9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: -9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: -4294967296, want: -4294967295},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: -4294967296, want: -4294967295},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: -1, want: 0},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: -1, want: 0},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: 0, want: 1},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: 0, want: 1},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: 1, want: 2},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: 1, want: 2},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: 4294967296, want: 4294967297},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: 4294967296, want: 4294967297},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: add_1_int64, fnname: "add_1_int64", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: add_int64_1, fnname: "add_int64_1", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: -4294967296, want: 0},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: -1, want: 4294967295},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: -1, want: 4294967295},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: 0, want: 4294967296},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: 0, want: 4294967296},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: 1, want: 4294967297},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: 1, want: 4294967297},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: 4294967296, want: 8589934592},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: 4294967296, want: 8589934592},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: 9223372036854775806, want: -9223372032559808514},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: 9223372036854775806, want: -9223372032559808514},
+ test_int64{fn: add_4294967296_int64, fnname: "add_4294967296_int64", in: 9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: add_int64_4294967296, fnname: "add_int64_4294967296", in: 9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: -9223372036854775808, want: -2},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: -9223372036854775808, want: -2},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: -9223372036854775807, want: -1},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: -4294967296, want: 9223372032559808510},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: -4294967296, want: 9223372032559808510},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: -1, want: 9223372036854775805},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: -1, want: 9223372036854775805},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: 0, want: 9223372036854775806},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: 0, want: 9223372036854775806},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: 1, want: 9223372036854775807},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: 4294967296, want: -9223372032559808514},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: 4294967296, want: -9223372032559808514},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: 9223372036854775806, want: -4},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: 9223372036854775806, want: -4},
+ test_int64{fn: add_9223372036854775806_int64, fnname: "add_9223372036854775806_int64", in: 9223372036854775807, want: -3},
+ test_int64{fn: add_int64_9223372036854775806, fnname: "add_int64_9223372036854775806", in: 9223372036854775807, want: -3},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: -9223372036854775807, want: 0},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: -4294967296, want: 9223372032559808511},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: -4294967296, want: 9223372032559808511},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: -1, want: 9223372036854775806},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: -1, want: 9223372036854775806},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: 0, want: 9223372036854775807},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: 0, want: 9223372036854775807},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: 1, want: -9223372036854775808},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: 1, want: -9223372036854775808},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: 4294967296, want: -9223372032559808513},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: 4294967296, want: -9223372032559808513},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: 9223372036854775806, want: -3},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: 9223372036854775806, want: -3},
+ test_int64{fn: add_9223372036854775807_int64, fnname: "add_9223372036854775807_int64", in: 9223372036854775807, want: -2},
+ test_int64{fn: add_int64_9223372036854775807, fnname: "add_int64_9223372036854775807", in: 9223372036854775807, want: -2},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: -9223372036854775808, want: 0},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: -9223372036854775807, want: 1},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: -4294967296, want: -9223372032559808512},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: -1, want: -9223372036854775807},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: -1, want: 9223372036854775807},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: 0, want: -9223372036854775808},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: 0, want: -9223372036854775808},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: 1, want: -9223372036854775807},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: 4294967296, want: 9223372032559808512},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: 9223372036854775806, want: 2},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: 9223372036854775806, want: -2},
+ test_int64{fn: sub_Neg9223372036854775808_int64, fnname: "sub_Neg9223372036854775808_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: sub_int64_Neg9223372036854775808, fnname: "sub_int64_Neg9223372036854775808", in: 9223372036854775807, want: -1},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: -9223372036854775808, want: 1},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: -9223372036854775807, want: 0},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: -4294967296, want: -9223372032559808511},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: -4294967296, want: 9223372032559808511},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: -1, want: -9223372036854775806},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: -1, want: 9223372036854775806},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: 0, want: -9223372036854775807},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: 0, want: 9223372036854775807},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: 1, want: -9223372036854775808},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: 1, want: -9223372036854775808},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: 4294967296, want: 9223372032559808513},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: 4294967296, want: -9223372032559808513},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: 9223372036854775806, want: 3},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: 9223372036854775806, want: -3},
+ test_int64{fn: sub_Neg9223372036854775807_int64, fnname: "sub_Neg9223372036854775807_int64", in: 9223372036854775807, want: 2},
+ test_int64{fn: sub_int64_Neg9223372036854775807, fnname: "sub_int64_Neg9223372036854775807", in: 9223372036854775807, want: -2},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: -9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: -4294967296, want: 0},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: -1, want: -4294967295},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: -1, want: 4294967295},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: 0, want: -4294967296},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: 0, want: 4294967296},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: 1, want: -4294967297},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: 1, want: 4294967297},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: 4294967296, want: -8589934592},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: 4294967296, want: 8589934592},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: 9223372036854775806, want: 9223372032559808514},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: 9223372036854775806, want: -9223372032559808514},
+ test_int64{fn: sub_Neg4294967296_int64, fnname: "sub_Neg4294967296_int64", in: 9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: sub_int64_Neg4294967296, fnname: "sub_int64_Neg4294967296", in: 9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: -9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: -4294967296, want: 4294967295},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: -4294967296, want: -4294967295},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: -1, want: 0},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: -1, want: 0},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: 0, want: -1},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: 0, want: 1},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: 1, want: -2},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: 1, want: 2},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: 4294967296, want: -4294967297},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: 4294967296, want: 4294967297},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: 9223372036854775806, want: -9223372036854775807},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: sub_Neg1_int64, fnname: "sub_Neg1_int64", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: sub_int64_Neg1, fnname: "sub_int64_Neg1", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: -9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: -4294967296, want: 4294967296},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: -4294967296, want: -4294967296},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: -1, want: 1},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: -1, want: -1},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: 0, want: 0},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: 0, want: 0},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: 1, want: -1},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: 1, want: 1},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: 4294967296, want: -4294967296},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: 4294967296, want: 4294967296},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: sub_0_int64, fnname: "sub_0_int64", in: 9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: sub_int64_0, fnname: "sub_int64_0", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: -4294967296, want: 4294967297},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: -4294967296, want: -4294967297},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: -1, want: 2},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: -1, want: -2},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: 0, want: 1},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: 0, want: -1},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: 1, want: 0},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: 1, want: 0},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: 4294967296, want: -4294967295},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: 4294967296, want: 4294967295},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: 9223372036854775806, want: -9223372036854775805},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: 9223372036854775806, want: 9223372036854775805},
+ test_int64{fn: sub_1_int64, fnname: "sub_1_int64", in: 9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: sub_int64_1, fnname: "sub_int64_1", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: -9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: -9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: -4294967296, want: 8589934592},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: -4294967296, want: -8589934592},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: -1, want: 4294967297},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: -1, want: -4294967297},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: 0, want: 4294967296},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: 0, want: -4294967296},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: 1, want: 4294967295},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: 1, want: -4294967295},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: 4294967296, want: 0},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: 9223372036854775806, want: -9223372032559808510},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: 9223372036854775806, want: 9223372032559808510},
+ test_int64{fn: sub_4294967296_int64, fnname: "sub_4294967296_int64", in: 9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: sub_int64_4294967296, fnname: "sub_int64_4294967296", in: 9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: -9223372036854775808, want: -2},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: -9223372036854775808, want: 2},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: -9223372036854775807, want: -3},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: -9223372036854775807, want: 3},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: -4294967296, want: -9223372032559808514},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: -4294967296, want: 9223372032559808514},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: -1, want: -9223372036854775807},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: 0, want: 9223372036854775806},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: 0, want: -9223372036854775806},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: 1, want: 9223372036854775805},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: 1, want: -9223372036854775805},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: 4294967296, want: 9223372032559808510},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: 4294967296, want: -9223372032559808510},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: 9223372036854775806, want: 0},
+ test_int64{fn: sub_9223372036854775806_int64, fnname: "sub_9223372036854775806_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: sub_int64_9223372036854775806, fnname: "sub_int64_9223372036854775806", in: 9223372036854775807, want: 1},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: -9223372036854775808, want: 1},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: -9223372036854775807, want: -2},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: -9223372036854775807, want: 2},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: -4294967296, want: -9223372032559808513},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: -4294967296, want: 9223372032559808513},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: -1, want: -9223372036854775808},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: 0, want: 9223372036854775807},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: 0, want: -9223372036854775807},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: 1, want: 9223372036854775806},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: 1, want: -9223372036854775806},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: 4294967296, want: 9223372032559808511},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: 9223372036854775806, want: -1},
+ test_int64{fn: sub_9223372036854775807_int64, fnname: "sub_9223372036854775807_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: sub_int64_9223372036854775807, fnname: "sub_int64_9223372036854775807", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: -9223372036854775808, want: 1},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: -9223372036854775808, want: 1},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: -4294967296, want: 2147483648},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: -4294967296, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: -1, want: 0},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: 0, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: 1, want: -9223372036854775808},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: 1, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: 4294967296, want: -2147483648},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: 4294967296, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_Neg9223372036854775808_int64, fnname: "div_Neg9223372036854775808_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: div_int64_Neg9223372036854775808, fnname: "div_int64_Neg9223372036854775808", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: -9223372036854775808, want: 1},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: -9223372036854775807, want: 1},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: -4294967296, want: 2147483647},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: -4294967296, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: -1, want: 0},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: 0, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: 1, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: 4294967296, want: -2147483647},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: 4294967296, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_Neg9223372036854775807_int64, fnname: "div_Neg9223372036854775807_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: div_int64_Neg9223372036854775807, fnname: "div_int64_Neg9223372036854775807", in: 9223372036854775807, want: -1},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: -9223372036854775808, want: 2147483648},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: -9223372036854775807, want: 2147483647},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: -4294967296, want: 1},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: -4294967296, want: 1},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: -1, want: 4294967296},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: -1, want: 0},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: 0, want: 0},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: 1, want: -4294967296},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: 1, want: 0},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: 4294967296, want: -1},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: 4294967296, want: -1},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: 9223372036854775806, want: -2147483647},
+ test_int64{fn: div_Neg4294967296_int64, fnname: "div_Neg4294967296_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_int64_Neg4294967296, fnname: "div_int64_Neg4294967296", in: 9223372036854775807, want: -2147483647},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: -9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: -4294967296, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: -4294967296, want: 4294967296},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: -1, want: 1},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: -1, want: 1},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: 0, want: 0},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: 1, want: -1},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: 1, want: -1},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: 4294967296, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: 4294967296, want: -4294967296},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: div_Neg1_int64, fnname: "div_Neg1_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_int64_Neg1, fnname: "div_int64_Neg1", in: 9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: -4294967296, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: -1, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: 1, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: 4294967296, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_0_int64, fnname: "div_0_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: -4294967296, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: -4294967296, want: -4294967296},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: -1, want: -1},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: -1, want: -1},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: 0, want: 0},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: 1, want: 1},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: 1, want: 1},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: 4294967296, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: 4294967296, want: 4294967296},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: div_1_int64, fnname: "div_1_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_int64_1, fnname: "div_int64_1", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: -9223372036854775808, want: -2147483648},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: -9223372036854775807, want: -2147483647},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: -4294967296, want: -1},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: -4294967296, want: -1},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: -1, want: -4294967296},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: -1, want: 0},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: 0, want: 0},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: 1, want: 4294967296},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: 1, want: 0},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: 4294967296, want: 1},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: 4294967296, want: 1},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: 9223372036854775806, want: 2147483647},
+ test_int64{fn: div_4294967296_int64, fnname: "div_4294967296_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_int64_4294967296, fnname: "div_int64_4294967296", in: 9223372036854775807, want: 2147483647},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: -9223372036854775808, want: -1},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: -9223372036854775807, want: -1},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: -4294967296, want: -2147483647},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: -4294967296, want: 0},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: -1, want: -9223372036854775806},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: -1, want: 0},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: 0, want: 0},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: 1, want: 9223372036854775806},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: 1, want: 0},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: 4294967296, want: 2147483647},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: 4294967296, want: 0},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: 9223372036854775806, want: 1},
+ test_int64{fn: div_9223372036854775806_int64, fnname: "div_9223372036854775806_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: div_int64_9223372036854775806, fnname: "div_int64_9223372036854775806", in: 9223372036854775807, want: 1},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: -9223372036854775807, want: -1},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: -4294967296, want: -2147483647},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: -4294967296, want: 0},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: -1, want: -9223372036854775807},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: -1, want: 0},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: 0, want: 0},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: 1, want: 0},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: 4294967296, want: 2147483647},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: 4294967296, want: 0},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: 9223372036854775806, want: 0},
+ test_int64{fn: div_9223372036854775807_int64, fnname: "div_9223372036854775807_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: div_int64_9223372036854775807, fnname: "div_int64_9223372036854775807", in: 9223372036854775807, want: 1},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: -4294967296, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: -4294967296, want: 0},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: -1, want: -9223372036854775808},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: 0, want: 0},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: 1, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: 1, want: -9223372036854775808},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: 4294967296, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: 4294967296, want: 0},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: 9223372036854775806, want: 0},
+ test_int64{fn: mul_Neg9223372036854775808_int64, fnname: "mul_Neg9223372036854775808_int64", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg9223372036854775808, fnname: "mul_int64_Neg9223372036854775808", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: -9223372036854775807, want: 1},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: -4294967296, want: -4294967296},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: -1, want: 9223372036854775807},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: 0, want: 0},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: 1, want: -9223372036854775807},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: 4294967296, want: 4294967296},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mul_Neg9223372036854775807_int64, fnname: "mul_Neg9223372036854775807_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: mul_int64_Neg9223372036854775807, fnname: "mul_int64_Neg9223372036854775807", in: 9223372036854775807, want: -1},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: -9223372036854775807, want: -4294967296},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: -9223372036854775807, want: -4294967296},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: -4294967296, want: 0},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: -1, want: 4294967296},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: -1, want: 4294967296},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: 0, want: 0},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: 1, want: -4294967296},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: 1, want: -4294967296},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: 4294967296, want: 0},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: 9223372036854775806, want: 8589934592},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: 9223372036854775806, want: 8589934592},
+ test_int64{fn: mul_Neg4294967296_int64, fnname: "mul_Neg4294967296_int64", in: 9223372036854775807, want: 4294967296},
+ test_int64{fn: mul_int64_Neg4294967296, fnname: "mul_int64_Neg4294967296", in: 9223372036854775807, want: 4294967296},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: -9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: -9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: -4294967296, want: 4294967296},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: -4294967296, want: 4294967296},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: -1, want: 1},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: -1, want: 1},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: 0, want: 0},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: 1, want: -1},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: 1, want: -1},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: 4294967296, want: -4294967296},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: 4294967296, want: -4294967296},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: mul_Neg1_int64, fnname: "mul_Neg1_int64", in: 9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: mul_int64_Neg1, fnname: "mul_int64_Neg1", in: 9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: -9223372036854775807, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: -4294967296, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: -4294967296, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: -1, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: -1, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: 0, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: 1, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: 1, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: 4294967296, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: 4294967296, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: 9223372036854775806, want: 0},
+ test_int64{fn: mul_0_int64, fnname: "mul_0_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: mul_int64_0, fnname: "mul_int64_0", in: 9223372036854775807, want: 0},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: -4294967296, want: -4294967296},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: -1, want: -1},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: -1, want: -1},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: 0, want: 0},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: 1, want: 1},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: 1, want: 1},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: 4294967296, want: 4294967296},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mul_1_int64, fnname: "mul_1_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: mul_int64_1, fnname: "mul_int64_1", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: -9223372036854775807, want: 4294967296},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: -9223372036854775807, want: 4294967296},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: -4294967296, want: 0},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: -1, want: -4294967296},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: -1, want: -4294967296},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: 0, want: 0},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: 1, want: 4294967296},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: 1, want: 4294967296},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: 4294967296, want: 0},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: 9223372036854775806, want: -8589934592},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: 9223372036854775806, want: -8589934592},
+ test_int64{fn: mul_4294967296_int64, fnname: "mul_4294967296_int64", in: 9223372036854775807, want: -4294967296},
+ test_int64{fn: mul_int64_4294967296, fnname: "mul_int64_4294967296", in: 9223372036854775807, want: -4294967296},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: -9223372036854775808, want: 0},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: -4294967296, want: 8589934592},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: -4294967296, want: 8589934592},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: -1, want: -9223372036854775806},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: -1, want: -9223372036854775806},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: 0, want: 0},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: 1, want: 9223372036854775806},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: 1, want: 9223372036854775806},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: 4294967296, want: -8589934592},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: 4294967296, want: -8589934592},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: 9223372036854775806, want: 4},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: 9223372036854775806, want: 4},
+ test_int64{fn: mul_9223372036854775806_int64, fnname: "mul_9223372036854775806_int64", in: 9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: mul_int64_9223372036854775806, fnname: "mul_int64_9223372036854775806", in: 9223372036854775807, want: -9223372036854775806},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: -9223372036854775807, want: -1},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: -4294967296, want: 4294967296},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: -4294967296, want: 4294967296},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: -1, want: -9223372036854775807},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: -1, want: -9223372036854775807},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: 0, want: 0},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: 0, want: 0},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: 1, want: 9223372036854775807},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: 4294967296, want: -4294967296},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: 4294967296, want: -4294967296},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: 9223372036854775806, want: -9223372036854775806},
+ test_int64{fn: mul_9223372036854775807_int64, fnname: "mul_9223372036854775807_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: mul_int64_9223372036854775807, fnname: "mul_int64_9223372036854775807", in: 9223372036854775807, want: 1},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: -4294967296, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: -4294967296, want: -4294967296},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: -1, want: -1},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: 0, want: 0},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: 1, want: 1},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: 4294967296, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: 4294967296, want: 4294967296},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: 9223372036854775806, want: -2},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mod_Neg9223372036854775808_int64, fnname: "mod_Neg9223372036854775808_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: mod_int64_Neg9223372036854775808, fnname: "mod_int64_Neg9223372036854775808", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: -4294967296, want: -4294967295},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: -4294967296, want: -4294967296},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: -1, want: -1},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: 0, want: 0},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: 1, want: 1},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: 4294967296, want: -4294967295},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: 4294967296, want: 4294967296},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mod_Neg9223372036854775807_int64, fnname: "mod_Neg9223372036854775807_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_int64_Neg9223372036854775807, fnname: "mod_int64_Neg9223372036854775807", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: -9223372036854775808, want: -4294967296},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: -9223372036854775807, want: -4294967296},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: -9223372036854775807, want: -4294967295},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: -4294967296, want: 0},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: -1, want: -1},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: 0, want: 0},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: 1, want: 1},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: 4294967296, want: 0},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: 9223372036854775806, want: -4294967296},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: 9223372036854775806, want: 4294967294},
+ test_int64{fn: mod_Neg4294967296_int64, fnname: "mod_Neg4294967296_int64", in: 9223372036854775807, want: -4294967296},
+ test_int64{fn: mod_int64_Neg4294967296, fnname: "mod_int64_Neg4294967296", in: 9223372036854775807, want: 4294967295},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: -4294967296, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: -4294967296, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: -1, want: 0},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: 0, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: 1, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: 4294967296, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: 4294967296, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: 9223372036854775806, want: 0},
+ test_int64{fn: mod_Neg1_int64, fnname: "mod_Neg1_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: mod_int64_Neg1, fnname: "mod_int64_Neg1", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: -4294967296, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: -1, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: 1, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: 4294967296, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: mod_0_int64, fnname: "mod_0_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: -9223372036854775808, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: -4294967296, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: -4294967296, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: -1, want: 0},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: 0, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: 1, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: 4294967296, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: 4294967296, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: 9223372036854775806, want: 0},
+ test_int64{fn: mod_1_int64, fnname: "mod_1_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: mod_int64_1, fnname: "mod_int64_1", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: -9223372036854775808, want: 4294967296},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: -9223372036854775808, want: 0},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: -9223372036854775807, want: 4294967296},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: -9223372036854775807, want: -4294967295},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: -4294967296, want: 0},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: -1, want: -1},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: 0, want: 0},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: 1, want: 1},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: 4294967296, want: 0},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: 9223372036854775806, want: 4294967296},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: 9223372036854775806, want: 4294967294},
+ test_int64{fn: mod_4294967296_int64, fnname: "mod_4294967296_int64", in: 9223372036854775807, want: 4294967296},
+ test_int64{fn: mod_int64_4294967296, fnname: "mod_int64_4294967296", in: 9223372036854775807, want: 4294967295},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: -9223372036854775808, want: 9223372036854775806},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: -9223372036854775808, want: -2},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: -9223372036854775807, want: -1},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: -4294967296, want: 4294967294},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: -4294967296, want: -4294967296},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: -1, want: -1},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: 0, want: 0},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: 1, want: 1},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: 4294967296, want: 4294967294},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: 4294967296, want: 4294967296},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: 9223372036854775806, want: 0},
+ test_int64{fn: mod_9223372036854775806_int64, fnname: "mod_9223372036854775806_int64", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: mod_int64_9223372036854775806, fnname: "mod_int64_9223372036854775806", in: 9223372036854775807, want: 1},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: -9223372036854775807, want: 0},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: -4294967296, want: 4294967295},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: -4294967296, want: -4294967296},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: -1, want: 0},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: -1, want: -1},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: 0, want: 0},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: 1, want: 0},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: 1, want: 1},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: 4294967296, want: 4294967295},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: 4294967296, want: 4294967296},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: mod_9223372036854775807_int64, fnname: "mod_9223372036854775807_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: mod_int64_9223372036854775807, fnname: "mod_int64_9223372036854775807", in: 9223372036854775807, want: 0},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: -4294967296, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: -4294967296, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: -1, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: 0, want: 0},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: 1, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: 1, want: 0},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: 4294967296, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: 4294967296, want: 0},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_Neg9223372036854775808_int64, fnname: "and_Neg9223372036854775808_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775808, fnname: "and_int64_Neg9223372036854775808", in: 9223372036854775807, want: 0},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: -4294967296, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: -4294967296, want: -9223372036854775808},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: -1, want: -9223372036854775807},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: -1, want: -9223372036854775807},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: 0, want: 0},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: 1, want: 1},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: 1, want: 1},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: 4294967296, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: 4294967296, want: 0},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_Neg9223372036854775807_int64, fnname: "and_Neg9223372036854775807_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: and_int64_Neg9223372036854775807, fnname: "and_int64_Neg9223372036854775807", in: 9223372036854775807, want: 1},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: -4294967296, want: -4294967296},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: -1, want: -4294967296},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: -1, want: -4294967296},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: 0, want: 0},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: 1, want: 0},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: 1, want: 0},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: 9223372036854775806, want: 9223372032559808512},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: 9223372036854775806, want: 9223372032559808512},
+ test_int64{fn: and_Neg4294967296_int64, fnname: "and_Neg4294967296_int64", in: 9223372036854775807, want: 9223372032559808512},
+ test_int64{fn: and_int64_Neg4294967296, fnname: "and_int64_Neg4294967296", in: 9223372036854775807, want: 9223372032559808512},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: -4294967296, want: -4294967296},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: -1, want: -1},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: -1, want: -1},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: 0, want: 0},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: 1, want: 1},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: 1, want: 1},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_Neg1_int64, fnname: "and_Neg1_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: and_int64_Neg1, fnname: "and_int64_Neg1", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: -4294967296, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: -4294967296, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: -1, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: -1, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: 0, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: 1, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: 1, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: 4294967296, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: 4294967296, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_0_int64, fnname: "and_0_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: and_int64_0, fnname: "and_int64_0", in: 9223372036854775807, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: -9223372036854775807, want: 1},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: -4294967296, want: 0},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: -4294967296, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: -1, want: 1},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: -1, want: 1},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: 0, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: 1, want: 1},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: 1, want: 1},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: 4294967296, want: 0},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: 4294967296, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: 9223372036854775806, want: 0},
+ test_int64{fn: and_1_int64, fnname: "and_1_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: and_int64_1, fnname: "and_int64_1", in: 9223372036854775807, want: 1},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: -4294967296, want: 4294967296},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: -4294967296, want: 4294967296},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: -1, want: 4294967296},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: -1, want: 4294967296},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: 0, want: 0},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: 1, want: 0},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: 1, want: 0},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: 9223372036854775806, want: 4294967296},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: 9223372036854775806, want: 4294967296},
+ test_int64{fn: and_4294967296_int64, fnname: "and_4294967296_int64", in: 9223372036854775807, want: 4294967296},
+ test_int64{fn: and_int64_4294967296, fnname: "and_int64_4294967296", in: 9223372036854775807, want: 4294967296},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: -9223372036854775807, want: 0},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: -1, want: 9223372036854775806},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: -1, want: 9223372036854775806},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: 0, want: 0},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: 1, want: 0},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: 1, want: 0},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_9223372036854775806_int64, fnname: "and_9223372036854775806_int64", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: and_int64_9223372036854775806, fnname: "and_int64_9223372036854775806", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: -9223372036854775808, want: 0},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: -9223372036854775807, want: 1},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: -1, want: 9223372036854775807},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: 0, want: 0},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: 0, want: 0},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: 1, want: 1},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: 1, want: 1},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: 4294967296, want: 4294967296},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: and_9223372036854775807_int64, fnname: "and_9223372036854775807_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: and_int64_9223372036854775807, fnname: "and_int64_9223372036854775807", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: -1, want: -1},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: 0, want: -9223372036854775808},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: 0, want: -9223372036854775808},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: 1, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: 9223372036854775806, want: -2},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: 9223372036854775806, want: -2},
+ test_int64{fn: or_Neg9223372036854775808_int64, fnname: "or_Neg9223372036854775808_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_int64_Neg9223372036854775808, fnname: "or_int64_Neg9223372036854775808", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: -4294967296, want: -4294967295},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: -4294967296, want: -4294967295},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: -1, want: -1},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: 0, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: 0, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: 1, want: -9223372036854775807},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: 9223372036854775806, want: -1},
+ test_int64{fn: or_Neg9223372036854775807_int64, fnname: "or_Neg9223372036854775807_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_int64_Neg9223372036854775807, fnname: "or_int64_Neg9223372036854775807", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: -9223372036854775808, want: -4294967296},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: -9223372036854775808, want: -4294967296},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: -9223372036854775807, want: -4294967295},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: -9223372036854775807, want: -4294967295},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: -1, want: -1},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: 0, want: -4294967296},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: 0, want: -4294967296},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: 1, want: -4294967295},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: 1, want: -4294967295},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: 4294967296, want: -4294967296},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: 4294967296, want: -4294967296},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: 9223372036854775806, want: -2},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: 9223372036854775806, want: -2},
+ test_int64{fn: or_Neg4294967296_int64, fnname: "or_Neg4294967296_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_int64_Neg4294967296, fnname: "or_int64_Neg4294967296", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: -9223372036854775808, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: -4294967296, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: -4294967296, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: -1, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: 0, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: 0, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: 1, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: 1, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: 4294967296, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: 4294967296, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: 9223372036854775806, want: -1},
+ test_int64{fn: or_Neg1_int64, fnname: "or_Neg1_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_int64_Neg1, fnname: "or_int64_Neg1", in: 9223372036854775807, want: -1},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: -1, want: -1},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: 0, want: 0},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: 0, want: 0},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: 1, want: 1},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: 1, want: 1},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: 4294967296, want: 4294967296},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_0_int64, fnname: "or_0_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_int64_0, fnname: "or_int64_0", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: -4294967296, want: -4294967295},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: -4294967296, want: -4294967295},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: -1, want: -1},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: 0, want: 1},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: 0, want: 1},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: 1, want: 1},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: 1, want: 1},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: 4294967296, want: 4294967297},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: 4294967296, want: 4294967297},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: or_1_int64, fnname: "or_1_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_int64_1, fnname: "or_int64_1", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: -4294967296, want: -4294967296},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: -1, want: -1},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: 0, want: 4294967296},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: 0, want: 4294967296},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: 1, want: 4294967297},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: 1, want: 4294967297},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: 4294967296, want: 4294967296},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_4294967296_int64, fnname: "or_4294967296_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_int64_4294967296, fnname: "or_int64_4294967296", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: -9223372036854775808, want: -2},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: -9223372036854775808, want: -2},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: -4294967296, want: -2},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: -4294967296, want: -2},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: -1, want: -1},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: 0, want: 9223372036854775806},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: 0, want: 9223372036854775806},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: 1, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: 4294967296, want: 9223372036854775806},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: 4294967296, want: 9223372036854775806},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: or_9223372036854775806_int64, fnname: "or_9223372036854775806_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775806, fnname: "or_int64_9223372036854775806", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: -9223372036854775807, want: -1},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: -4294967296, want: -1},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: -4294967296, want: -1},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: -1, want: -1},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: -1, want: -1},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: 0, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: 0, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: 1, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: 4294967296, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: 4294967296, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: or_9223372036854775807_int64, fnname: "or_9223372036854775807_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: or_int64_9223372036854775807, fnname: "or_int64_9223372036854775807", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: -9223372036854775808, want: 0},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: -9223372036854775808, want: 0},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: -9223372036854775807, want: 1},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: -9223372036854775807, want: 1},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: -4294967296, want: 9223372032559808512},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: -1, want: 9223372036854775807},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: -1, want: 9223372036854775807},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: 0, want: -9223372036854775808},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: 0, want: -9223372036854775808},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: 1, want: -9223372036854775807},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: 1, want: -9223372036854775807},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: 4294967296, want: -9223372032559808512},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: 9223372036854775806, want: -2},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: 9223372036854775806, want: -2},
+ test_int64{fn: xor_Neg9223372036854775808_int64, fnname: "xor_Neg9223372036854775808_int64", in: 9223372036854775807, want: -1},
+ test_int64{fn: xor_int64_Neg9223372036854775808, fnname: "xor_int64_Neg9223372036854775808", in: 9223372036854775807, want: -1},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: -9223372036854775808, want: 1},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: -9223372036854775808, want: 1},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: -9223372036854775807, want: 0},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: -9223372036854775807, want: 0},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: -4294967296, want: 9223372032559808513},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: -4294967296, want: 9223372032559808513},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: -1, want: 9223372036854775806},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: -1, want: 9223372036854775806},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: 0, want: -9223372036854775807},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: 0, want: -9223372036854775807},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: 1, want: -9223372036854775808},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: 1, want: -9223372036854775808},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: 4294967296, want: -9223372032559808511},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: 9223372036854775806, want: -1},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: 9223372036854775806, want: -1},
+ test_int64{fn: xor_Neg9223372036854775807_int64, fnname: "xor_Neg9223372036854775807_int64", in: 9223372036854775807, want: -2},
+ test_int64{fn: xor_int64_Neg9223372036854775807, fnname: "xor_int64_Neg9223372036854775807", in: 9223372036854775807, want: -2},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: -9223372036854775808, want: 9223372032559808512},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: -9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: -9223372036854775807, want: 9223372032559808513},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: -4294967296, want: 0},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: -4294967296, want: 0},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: -1, want: 4294967295},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: -1, want: 4294967295},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: 0, want: -4294967296},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: 0, want: -4294967296},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: 1, want: -4294967295},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: 1, want: -4294967295},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: 4294967296, want: -8589934592},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: 4294967296, want: -8589934592},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: 9223372036854775806, want: -9223372032559808514},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: 9223372036854775806, want: -9223372032559808514},
+ test_int64{fn: xor_Neg4294967296_int64, fnname: "xor_Neg4294967296_int64", in: 9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: xor_int64_Neg4294967296, fnname: "xor_int64_Neg4294967296", in: 9223372036854775807, want: -9223372032559808513},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: -9223372036854775808, want: 9223372036854775807},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: -9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: -4294967296, want: 4294967295},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: -4294967296, want: 4294967295},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: -1, want: 0},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: -1, want: 0},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: 0, want: -1},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: 0, want: -1},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: 1, want: -2},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: 1, want: -2},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: 4294967296, want: -4294967297},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: 4294967296, want: -4294967297},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: 9223372036854775806, want: -9223372036854775807},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: 9223372036854775806, want: -9223372036854775807},
+ test_int64{fn: xor_Neg1_int64, fnname: "xor_Neg1_int64", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: xor_int64_Neg1, fnname: "xor_int64_Neg1", in: 9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: -9223372036854775808, want: -9223372036854775808},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: -9223372036854775807, want: -9223372036854775807},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: -4294967296, want: -4294967296},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: -4294967296, want: -4294967296},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: -1, want: -1},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: -1, want: -1},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: 0, want: 0},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: 0, want: 0},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: 1, want: 1},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: 1, want: 1},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: 4294967296, want: 4294967296},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: 4294967296, want: 4294967296},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: 9223372036854775806, want: 9223372036854775806},
+ test_int64{fn: xor_0_int64, fnname: "xor_0_int64", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: xor_int64_0, fnname: "xor_int64_0", in: 9223372036854775807, want: 9223372036854775807},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: -9223372036854775808, want: -9223372036854775807},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: -9223372036854775807, want: -9223372036854775808},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: -4294967296, want: -4294967295},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: -4294967296, want: -4294967295},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: -1, want: -2},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: -1, want: -2},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: 0, want: 1},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: 0, want: 1},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: 1, want: 0},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: 1, want: 0},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: 4294967296, want: 4294967297},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: 4294967296, want: 4294967297},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: 9223372036854775806, want: 9223372036854775807},
+ test_int64{fn: xor_1_int64, fnname: "xor_1_int64", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: xor_int64_1, fnname: "xor_int64_1", in: 9223372036854775807, want: 9223372036854775806},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: -9223372036854775808, want: -9223372032559808512},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: -9223372036854775807, want: -9223372032559808511},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: -4294967296, want: -8589934592},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: -4294967296, want: -8589934592},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: -1, want: -4294967297},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: -1, want: -4294967297},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: 0, want: 4294967296},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: 0, want: 4294967296},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: 1, want: 4294967297},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: 1, want: 4294967297},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: 4294967296, want: 0},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: 4294967296, want: 0},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: 9223372036854775806, want: 9223372032559808510},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: 9223372036854775806, want: 9223372032559808510},
+ test_int64{fn: xor_4294967296_int64, fnname: "xor_4294967296_int64", in: 9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: xor_int64_4294967296, fnname: "xor_int64_4294967296", in: 9223372036854775807, want: 9223372032559808511},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: -9223372036854775808, want: -2},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: -9223372036854775808, want: -2},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: -9223372036854775807, want: -1},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: -9223372036854775807, want: -1},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: -4294967296, want: -9223372032559808514},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: -4294967296, want: -9223372032559808514},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: -1, want: -9223372036854775807},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: -1, want: -9223372036854775807},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: 0, want: 9223372036854775806},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: 0, want: 9223372036854775806},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: 1, want: 9223372036854775807},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: 1, want: 9223372036854775807},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: 4294967296, want: 9223372032559808510},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: 4294967296, want: 9223372032559808510},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: 9223372036854775806, want: 0},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: 9223372036854775806, want: 0},
+ test_int64{fn: xor_9223372036854775806_int64, fnname: "xor_9223372036854775806_int64", in: 9223372036854775807, want: 1},
+ test_int64{fn: xor_int64_9223372036854775806, fnname: "xor_int64_9223372036854775806", in: 9223372036854775807, want: 1},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: -9223372036854775808, want: -1},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: -9223372036854775808, want: -1},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: -9223372036854775807, want: -2},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: -9223372036854775807, want: -2},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: -4294967296, want: -9223372032559808513},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: -4294967296, want: -9223372032559808513},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: -1, want: -9223372036854775808},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: -1, want: -9223372036854775808},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: 0, want: 9223372036854775807},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: 0, want: 9223372036854775807},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: 1, want: 9223372036854775806},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: 1, want: 9223372036854775806},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: 4294967296, want: 9223372032559808511},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: 4294967296, want: 9223372032559808511},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: 9223372036854775806, want: 1},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: 9223372036854775806, want: 1},
+ test_int64{fn: xor_9223372036854775807_int64, fnname: "xor_9223372036854775807_int64", in: 9223372036854775807, want: 0},
+ test_int64{fn: xor_int64_9223372036854775807, fnname: "xor_int64_9223372036854775807", in: 9223372036854775807, want: 0}}
+
+type test_int64mul struct {
+ fn func(int64) int64
+ fnname string
+ in int64
+ want int64
+}
+
+var tests_int64mul = []test_int64{
+
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: -9, want: 81},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: -9, want: 81},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: -5, want: 45},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: -5, want: 45},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: -3, want: 27},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: -3, want: 27},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 3, want: -27},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 3, want: -27},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 5, want: -45},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 5, want: -45},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 7, want: -63},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 7, want: -63},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 9, want: -81},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 9, want: -81},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 10, want: -90},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 10, want: -90},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 11, want: -99},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 11, want: -99},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 13, want: -117},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 13, want: -117},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 19, want: -171},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 19, want: -171},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 21, want: -189},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 21, want: -189},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 25, want: -225},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 25, want: -225},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 27, want: -243},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 27, want: -243},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 37, want: -333},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 37, want: -333},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 41, want: -369},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 41, want: -369},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 45, want: -405},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 45, want: -405},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 73, want: -657},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 73, want: -657},
+ test_int64{fn: mul_Neg9_int64, fnname: "mul_Neg9_int64", in: 81, want: -729},
+ test_int64{fn: mul_int64_Neg9, fnname: "mul_int64_Neg9", in: 81, want: -729},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: -9, want: 45},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: -9, want: 45},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: -5, want: 25},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: -5, want: 25},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: -3, want: 15},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: -3, want: 15},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 3, want: -15},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 3, want: -15},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 5, want: -25},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 5, want: -25},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 7, want: -35},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 7, want: -35},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 9, want: -45},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 9, want: -45},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 10, want: -50},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 10, want: -50},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 11, want: -55},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 11, want: -55},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 13, want: -65},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 13, want: -65},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 19, want: -95},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 19, want: -95},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 21, want: -105},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 21, want: -105},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 25, want: -125},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 25, want: -125},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 27, want: -135},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 27, want: -135},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 37, want: -185},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 37, want: -185},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 41, want: -205},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 41, want: -205},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 45, want: -225},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 45, want: -225},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 73, want: -365},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 73, want: -365},
+ test_int64{fn: mul_Neg5_int64, fnname: "mul_Neg5_int64", in: 81, want: -405},
+ test_int64{fn: mul_int64_Neg5, fnname: "mul_int64_Neg5", in: 81, want: -405},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: -9, want: 27},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: -9, want: 27},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: -5, want: 15},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: -5, want: 15},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: -3, want: 9},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: -3, want: 9},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 3, want: -9},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 3, want: -9},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 5, want: -15},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 5, want: -15},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 7, want: -21},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 7, want: -21},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 9, want: -27},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 9, want: -27},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 10, want: -30},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 10, want: -30},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 11, want: -33},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 11, want: -33},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 13, want: -39},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 13, want: -39},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 19, want: -57},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 19, want: -57},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 21, want: -63},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 21, want: -63},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 25, want: -75},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 25, want: -75},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 27, want: -81},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 27, want: -81},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 37, want: -111},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 37, want: -111},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 41, want: -123},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 41, want: -123},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 45, want: -135},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 45, want: -135},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 73, want: -219},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 73, want: -219},
+ test_int64{fn: mul_Neg3_int64, fnname: "mul_Neg3_int64", in: 81, want: -243},
+ test_int64{fn: mul_int64_Neg3, fnname: "mul_int64_Neg3", in: 81, want: -243},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: -9, want: -27},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: -9, want: -27},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: -5, want: -15},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: -5, want: -15},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: -3, want: -9},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: -3, want: -9},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 3, want: 9},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 3, want: 9},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 5, want: 15},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 5, want: 15},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 7, want: 21},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 7, want: 21},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 9, want: 27},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 9, want: 27},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 10, want: 30},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 10, want: 30},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 11, want: 33},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 11, want: 33},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 13, want: 39},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 13, want: 39},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 19, want: 57},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 19, want: 57},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 21, want: 63},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 21, want: 63},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 25, want: 75},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 25, want: 75},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 27, want: 81},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 27, want: 81},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 37, want: 111},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 37, want: 111},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 41, want: 123},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 41, want: 123},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 45, want: 135},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 45, want: 135},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 73, want: 219},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 73, want: 219},
+ test_int64{fn: mul_3_int64, fnname: "mul_3_int64", in: 81, want: 243},
+ test_int64{fn: mul_int64_3, fnname: "mul_int64_3", in: 81, want: 243},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: -9, want: -45},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: -9, want: -45},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: -5, want: -25},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: -5, want: -25},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: -3, want: -15},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: -3, want: -15},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 3, want: 15},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 3, want: 15},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 5, want: 25},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 5, want: 25},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 7, want: 35},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 7, want: 35},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 9, want: 45},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 9, want: 45},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 10, want: 50},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 10, want: 50},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 11, want: 55},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 11, want: 55},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 13, want: 65},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 13, want: 65},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 19, want: 95},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 19, want: 95},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 21, want: 105},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 21, want: 105},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 25, want: 125},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 25, want: 125},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 27, want: 135},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 27, want: 135},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 37, want: 185},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 37, want: 185},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 41, want: 205},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 41, want: 205},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 45, want: 225},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 45, want: 225},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 73, want: 365},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 73, want: 365},
+ test_int64{fn: mul_5_int64, fnname: "mul_5_int64", in: 81, want: 405},
+ test_int64{fn: mul_int64_5, fnname: "mul_int64_5", in: 81, want: 405},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: -9, want: -63},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: -9, want: -63},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: -5, want: -35},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: -5, want: -35},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: -3, want: -21},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: -3, want: -21},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 3, want: 21},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 3, want: 21},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 5, want: 35},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 5, want: 35},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 7, want: 49},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 7, want: 49},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 9, want: 63},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 9, want: 63},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 10, want: 70},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 10, want: 70},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 11, want: 77},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 11, want: 77},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 13, want: 91},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 13, want: 91},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 19, want: 133},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 19, want: 133},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 21, want: 147},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 21, want: 147},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 25, want: 175},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 25, want: 175},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 27, want: 189},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 27, want: 189},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 37, want: 259},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 37, want: 259},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 41, want: 287},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 41, want: 287},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 45, want: 315},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 45, want: 315},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 73, want: 511},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 73, want: 511},
+ test_int64{fn: mul_7_int64, fnname: "mul_7_int64", in: 81, want: 567},
+ test_int64{fn: mul_int64_7, fnname: "mul_int64_7", in: 81, want: 567},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: -9, want: -81},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: -9, want: -81},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: -5, want: -45},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: -5, want: -45},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: -3, want: -27},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: -3, want: -27},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 3, want: 27},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 3, want: 27},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 5, want: 45},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 5, want: 45},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 7, want: 63},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 7, want: 63},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 9, want: 81},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 9, want: 81},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 10, want: 90},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 10, want: 90},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 11, want: 99},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 11, want: 99},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 13, want: 117},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 13, want: 117},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 19, want: 171},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 19, want: 171},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 21, want: 189},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 21, want: 189},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 25, want: 225},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 25, want: 225},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 27, want: 243},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 27, want: 243},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 37, want: 333},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 37, want: 333},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 41, want: 369},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 41, want: 369},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 45, want: 405},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 45, want: 405},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 73, want: 657},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 73, want: 657},
+ test_int64{fn: mul_9_int64, fnname: "mul_9_int64", in: 81, want: 729},
+ test_int64{fn: mul_int64_9, fnname: "mul_int64_9", in: 81, want: 729},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: -9, want: -90},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: -9, want: -90},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: -5, want: -50},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: -5, want: -50},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: -3, want: -30},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: -3, want: -30},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 3, want: 30},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 3, want: 30},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 5, want: 50},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 5, want: 50},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 7, want: 70},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 7, want: 70},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 9, want: 90},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 9, want: 90},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 10, want: 100},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 10, want: 100},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 11, want: 110},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 11, want: 110},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 13, want: 130},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 13, want: 130},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 19, want: 190},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 19, want: 190},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 21, want: 210},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 21, want: 210},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 25, want: 250},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 25, want: 250},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 27, want: 270},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 27, want: 270},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 37, want: 370},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 37, want: 370},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 41, want: 410},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 41, want: 410},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 45, want: 450},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 45, want: 450},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 73, want: 730},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 73, want: 730},
+ test_int64{fn: mul_10_int64, fnname: "mul_10_int64", in: 81, want: 810},
+ test_int64{fn: mul_int64_10, fnname: "mul_int64_10", in: 81, want: 810},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: -9, want: -99},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: -9, want: -99},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: -5, want: -55},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: -5, want: -55},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: -3, want: -33},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: -3, want: -33},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 3, want: 33},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 3, want: 33},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 5, want: 55},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 5, want: 55},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 7, want: 77},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 7, want: 77},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 9, want: 99},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 9, want: 99},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 10, want: 110},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 10, want: 110},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 11, want: 121},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 11, want: 121},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 13, want: 143},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 13, want: 143},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 19, want: 209},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 19, want: 209},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 21, want: 231},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 21, want: 231},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 25, want: 275},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 25, want: 275},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 27, want: 297},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 27, want: 297},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 37, want: 407},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 37, want: 407},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 41, want: 451},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 41, want: 451},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 45, want: 495},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 45, want: 495},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 73, want: 803},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 73, want: 803},
+ test_int64{fn: mul_11_int64, fnname: "mul_11_int64", in: 81, want: 891},
+ test_int64{fn: mul_int64_11, fnname: "mul_int64_11", in: 81, want: 891},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: -9, want: -117},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: -9, want: -117},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: -5, want: -65},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: -5, want: -65},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: -3, want: -39},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: -3, want: -39},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 3, want: 39},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 3, want: 39},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 5, want: 65},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 5, want: 65},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 7, want: 91},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 7, want: 91},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 9, want: 117},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 9, want: 117},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 10, want: 130},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 10, want: 130},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 11, want: 143},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 11, want: 143},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 13, want: 169},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 13, want: 169},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 19, want: 247},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 19, want: 247},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 21, want: 273},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 21, want: 273},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 25, want: 325},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 25, want: 325},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 27, want: 351},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 27, want: 351},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 37, want: 481},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 37, want: 481},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 41, want: 533},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 41, want: 533},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 45, want: 585},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 45, want: 585},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 73, want: 949},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 73, want: 949},
+ test_int64{fn: mul_13_int64, fnname: "mul_13_int64", in: 81, want: 1053},
+ test_int64{fn: mul_int64_13, fnname: "mul_int64_13", in: 81, want: 1053},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: -9, want: -171},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: -9, want: -171},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: -5, want: -95},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: -5, want: -95},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: -3, want: -57},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: -3, want: -57},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 3, want: 57},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 3, want: 57},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 5, want: 95},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 5, want: 95},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 7, want: 133},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 7, want: 133},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 9, want: 171},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 9, want: 171},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 10, want: 190},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 10, want: 190},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 11, want: 209},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 11, want: 209},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 13, want: 247},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 13, want: 247},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 19, want: 361},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 19, want: 361},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 21, want: 399},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 21, want: 399},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 25, want: 475},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 25, want: 475},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 27, want: 513},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 27, want: 513},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 37, want: 703},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 37, want: 703},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 41, want: 779},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 41, want: 779},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 45, want: 855},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 45, want: 855},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 73, want: 1387},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 73, want: 1387},
+ test_int64{fn: mul_19_int64, fnname: "mul_19_int64", in: 81, want: 1539},
+ test_int64{fn: mul_int64_19, fnname: "mul_int64_19", in: 81, want: 1539},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: -9, want: -189},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: -9, want: -189},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: -5, want: -105},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: -5, want: -105},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: -3, want: -63},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: -3, want: -63},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 3, want: 63},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 3, want: 63},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 5, want: 105},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 5, want: 105},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 7, want: 147},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 7, want: 147},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 9, want: 189},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 9, want: 189},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 10, want: 210},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 10, want: 210},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 11, want: 231},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 11, want: 231},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 13, want: 273},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 13, want: 273},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 19, want: 399},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 19, want: 399},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 21, want: 441},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 21, want: 441},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 25, want: 525},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 25, want: 525},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 27, want: 567},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 27, want: 567},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 37, want: 777},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 37, want: 777},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 41, want: 861},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 41, want: 861},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 45, want: 945},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 45, want: 945},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 73, want: 1533},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 73, want: 1533},
+ test_int64{fn: mul_21_int64, fnname: "mul_21_int64", in: 81, want: 1701},
+ test_int64{fn: mul_int64_21, fnname: "mul_int64_21", in: 81, want: 1701},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: -9, want: -225},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: -9, want: -225},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: -5, want: -125},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: -5, want: -125},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: -3, want: -75},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: -3, want: -75},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 3, want: 75},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 3, want: 75},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 5, want: 125},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 5, want: 125},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 7, want: 175},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 7, want: 175},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 9, want: 225},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 9, want: 225},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 10, want: 250},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 10, want: 250},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 11, want: 275},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 11, want: 275},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 13, want: 325},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 13, want: 325},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 19, want: 475},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 19, want: 475},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 21, want: 525},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 21, want: 525},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 25, want: 625},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 25, want: 625},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 27, want: 675},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 27, want: 675},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 37, want: 925},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 37, want: 925},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 41, want: 1025},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 41, want: 1025},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 45, want: 1125},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 45, want: 1125},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 73, want: 1825},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 73, want: 1825},
+ test_int64{fn: mul_25_int64, fnname: "mul_25_int64", in: 81, want: 2025},
+ test_int64{fn: mul_int64_25, fnname: "mul_int64_25", in: 81, want: 2025},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: -9, want: -243},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: -9, want: -243},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: -5, want: -135},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: -5, want: -135},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: -3, want: -81},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: -3, want: -81},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 3, want: 81},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 3, want: 81},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 5, want: 135},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 5, want: 135},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 7, want: 189},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 7, want: 189},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 9, want: 243},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 9, want: 243},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 10, want: 270},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 10, want: 270},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 11, want: 297},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 11, want: 297},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 13, want: 351},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 13, want: 351},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 19, want: 513},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 19, want: 513},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 21, want: 567},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 21, want: 567},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 25, want: 675},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 25, want: 675},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 27, want: 729},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 27, want: 729},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 37, want: 999},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 37, want: 999},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 41, want: 1107},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 41, want: 1107},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 45, want: 1215},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 45, want: 1215},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 73, want: 1971},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 73, want: 1971},
+ test_int64{fn: mul_27_int64, fnname: "mul_27_int64", in: 81, want: 2187},
+ test_int64{fn: mul_int64_27, fnname: "mul_int64_27", in: 81, want: 2187},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: -9, want: -333},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: -9, want: -333},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: -5, want: -185},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: -5, want: -185},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: -3, want: -111},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: -3, want: -111},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 3, want: 111},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 3, want: 111},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 5, want: 185},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 5, want: 185},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 7, want: 259},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 7, want: 259},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 9, want: 333},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 9, want: 333},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 10, want: 370},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 10, want: 370},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 11, want: 407},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 11, want: 407},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 13, want: 481},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 13, want: 481},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 19, want: 703},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 19, want: 703},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 21, want: 777},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 21, want: 777},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 25, want: 925},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 25, want: 925},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 27, want: 999},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 27, want: 999},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 37, want: 1369},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 37, want: 1369},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 41, want: 1517},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 41, want: 1517},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 45, want: 1665},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 45, want: 1665},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 73, want: 2701},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 73, want: 2701},
+ test_int64{fn: mul_37_int64, fnname: "mul_37_int64", in: 81, want: 2997},
+ test_int64{fn: mul_int64_37, fnname: "mul_int64_37", in: 81, want: 2997},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: -9, want: -369},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: -9, want: -369},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: -5, want: -205},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: -5, want: -205},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: -3, want: -123},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: -3, want: -123},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 3, want: 123},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 3, want: 123},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 5, want: 205},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 5, want: 205},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 7, want: 287},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 7, want: 287},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 9, want: 369},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 9, want: 369},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 10, want: 410},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 10, want: 410},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 11, want: 451},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 11, want: 451},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 13, want: 533},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 13, want: 533},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 19, want: 779},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 19, want: 779},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 21, want: 861},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 21, want: 861},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 25, want: 1025},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 25, want: 1025},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 27, want: 1107},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 27, want: 1107},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 37, want: 1517},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 37, want: 1517},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 41, want: 1681},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 41, want: 1681},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 45, want: 1845},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 45, want: 1845},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 73, want: 2993},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 73, want: 2993},
+ test_int64{fn: mul_41_int64, fnname: "mul_41_int64", in: 81, want: 3321},
+ test_int64{fn: mul_int64_41, fnname: "mul_int64_41", in: 81, want: 3321},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: -9, want: -405},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: -9, want: -405},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: -5, want: -225},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: -5, want: -225},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: -3, want: -135},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: -3, want: -135},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 3, want: 135},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 3, want: 135},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 5, want: 225},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 5, want: 225},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 7, want: 315},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 7, want: 315},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 9, want: 405},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 9, want: 405},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 10, want: 450},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 10, want: 450},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 11, want: 495},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 11, want: 495},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 13, want: 585},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 13, want: 585},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 19, want: 855},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 19, want: 855},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 21, want: 945},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 21, want: 945},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 25, want: 1125},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 25, want: 1125},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 27, want: 1215},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 27, want: 1215},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 37, want: 1665},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 37, want: 1665},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 41, want: 1845},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 41, want: 1845},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 45, want: 2025},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 45, want: 2025},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 73, want: 3285},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 73, want: 3285},
+ test_int64{fn: mul_45_int64, fnname: "mul_45_int64", in: 81, want: 3645},
+ test_int64{fn: mul_int64_45, fnname: "mul_int64_45", in: 81, want: 3645},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: -9, want: -657},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: -9, want: -657},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: -5, want: -365},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: -5, want: -365},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: -3, want: -219},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: -3, want: -219},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 3, want: 219},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 3, want: 219},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 5, want: 365},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 5, want: 365},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 7, want: 511},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 7, want: 511},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 9, want: 657},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 9, want: 657},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 10, want: 730},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 10, want: 730},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 11, want: 803},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 11, want: 803},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 13, want: 949},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 13, want: 949},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 19, want: 1387},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 19, want: 1387},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 21, want: 1533},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 21, want: 1533},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 25, want: 1825},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 25, want: 1825},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 27, want: 1971},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 27, want: 1971},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 37, want: 2701},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 37, want: 2701},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 41, want: 2993},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 41, want: 2993},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 45, want: 3285},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 45, want: 3285},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 73, want: 5329},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 73, want: 5329},
+ test_int64{fn: mul_73_int64, fnname: "mul_73_int64", in: 81, want: 5913},
+ test_int64{fn: mul_int64_73, fnname: "mul_int64_73", in: 81, want: 5913},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: -9, want: -729},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: -9, want: -729},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: -5, want: -405},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: -5, want: -405},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: -3, want: -243},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: -3, want: -243},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 3, want: 243},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 3, want: 243},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 5, want: 405},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 5, want: 405},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 7, want: 567},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 7, want: 567},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 9, want: 729},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 9, want: 729},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 10, want: 810},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 10, want: 810},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 11, want: 891},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 11, want: 891},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 13, want: 1053},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 13, want: 1053},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 19, want: 1539},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 19, want: 1539},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 21, want: 1701},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 21, want: 1701},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 25, want: 2025},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 25, want: 2025},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 27, want: 2187},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 27, want: 2187},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 37, want: 2997},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 37, want: 2997},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 41, want: 3321},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 41, want: 3321},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 45, want: 3645},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 45, want: 3645},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 73, want: 5913},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 73, want: 5913},
+ test_int64{fn: mul_81_int64, fnname: "mul_81_int64", in: 81, want: 6561},
+ test_int64{fn: mul_int64_81, fnname: "mul_int64_81", in: 81, want: 6561}}
+
+type test_uint32 struct {
+ fn func(uint32) uint32
+ fnname string
+ in uint32
+ want uint32
+}
+
+var tests_uint32 = []test_uint32{
+
+ test_uint32{fn: add_0_uint32, fnname: "add_0_uint32", in: 0, want: 0},
+ test_uint32{fn: add_uint32_0, fnname: "add_uint32_0", in: 0, want: 0},
+ test_uint32{fn: add_0_uint32, fnname: "add_0_uint32", in: 1, want: 1},
+ test_uint32{fn: add_uint32_0, fnname: "add_uint32_0", in: 1, want: 1},
+ test_uint32{fn: add_0_uint32, fnname: "add_0_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: add_uint32_0, fnname: "add_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: add_1_uint32, fnname: "add_1_uint32", in: 0, want: 1},
+ test_uint32{fn: add_uint32_1, fnname: "add_uint32_1", in: 0, want: 1},
+ test_uint32{fn: add_1_uint32, fnname: "add_1_uint32", in: 1, want: 2},
+ test_uint32{fn: add_uint32_1, fnname: "add_uint32_1", in: 1, want: 2},
+ test_uint32{fn: add_1_uint32, fnname: "add_1_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: add_uint32_1, fnname: "add_uint32_1", in: 4294967295, want: 0},
+ test_uint32{fn: add_4294967295_uint32, fnname: "add_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: add_uint32_4294967295, fnname: "add_uint32_4294967295", in: 0, want: 4294967295},
+ test_uint32{fn: add_4294967295_uint32, fnname: "add_4294967295_uint32", in: 1, want: 0},
+ test_uint32{fn: add_uint32_4294967295, fnname: "add_uint32_4294967295", in: 1, want: 0},
+ test_uint32{fn: add_4294967295_uint32, fnname: "add_4294967295_uint32", in: 4294967295, want: 4294967294},
+ test_uint32{fn: add_uint32_4294967295, fnname: "add_uint32_4294967295", in: 4294967295, want: 4294967294},
+ test_uint32{fn: sub_0_uint32, fnname: "sub_0_uint32", in: 0, want: 0},
+ test_uint32{fn: sub_uint32_0, fnname: "sub_uint32_0", in: 0, want: 0},
+ test_uint32{fn: sub_0_uint32, fnname: "sub_0_uint32", in: 1, want: 4294967295},
+ test_uint32{fn: sub_uint32_0, fnname: "sub_uint32_0", in: 1, want: 1},
+ test_uint32{fn: sub_0_uint32, fnname: "sub_0_uint32", in: 4294967295, want: 1},
+ test_uint32{fn: sub_uint32_0, fnname: "sub_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: sub_1_uint32, fnname: "sub_1_uint32", in: 0, want: 1},
+ test_uint32{fn: sub_uint32_1, fnname: "sub_uint32_1", in: 0, want: 4294967295},
+ test_uint32{fn: sub_1_uint32, fnname: "sub_1_uint32", in: 1, want: 0},
+ test_uint32{fn: sub_uint32_1, fnname: "sub_uint32_1", in: 1, want: 0},
+ test_uint32{fn: sub_1_uint32, fnname: "sub_1_uint32", in: 4294967295, want: 2},
+ test_uint32{fn: sub_uint32_1, fnname: "sub_uint32_1", in: 4294967295, want: 4294967294},
+ test_uint32{fn: sub_4294967295_uint32, fnname: "sub_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: sub_uint32_4294967295, fnname: "sub_uint32_4294967295", in: 0, want: 1},
+ test_uint32{fn: sub_4294967295_uint32, fnname: "sub_4294967295_uint32", in: 1, want: 4294967294},
+ test_uint32{fn: sub_uint32_4294967295, fnname: "sub_uint32_4294967295", in: 1, want: 2},
+ test_uint32{fn: sub_4294967295_uint32, fnname: "sub_4294967295_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: sub_uint32_4294967295, fnname: "sub_uint32_4294967295", in: 4294967295, want: 0},
+ test_uint32{fn: div_0_uint32, fnname: "div_0_uint32", in: 1, want: 0},
+ test_uint32{fn: div_0_uint32, fnname: "div_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: div_uint32_1, fnname: "div_uint32_1", in: 0, want: 0},
+ test_uint32{fn: div_1_uint32, fnname: "div_1_uint32", in: 1, want: 1},
+ test_uint32{fn: div_uint32_1, fnname: "div_uint32_1", in: 1, want: 1},
+ test_uint32{fn: div_1_uint32, fnname: "div_1_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: div_uint32_1, fnname: "div_uint32_1", in: 4294967295, want: 4294967295},
+ test_uint32{fn: div_uint32_4294967295, fnname: "div_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: div_4294967295_uint32, fnname: "div_4294967295_uint32", in: 1, want: 4294967295},
+ test_uint32{fn: div_uint32_4294967295, fnname: "div_uint32_4294967295", in: 1, want: 0},
+ test_uint32{fn: div_4294967295_uint32, fnname: "div_4294967295_uint32", in: 4294967295, want: 1},
+ test_uint32{fn: div_uint32_4294967295, fnname: "div_uint32_4294967295", in: 4294967295, want: 1},
+ test_uint32{fn: mul_0_uint32, fnname: "mul_0_uint32", in: 0, want: 0},
+ test_uint32{fn: mul_uint32_0, fnname: "mul_uint32_0", in: 0, want: 0},
+ test_uint32{fn: mul_0_uint32, fnname: "mul_0_uint32", in: 1, want: 0},
+ test_uint32{fn: mul_uint32_0, fnname: "mul_uint32_0", in: 1, want: 0},
+ test_uint32{fn: mul_0_uint32, fnname: "mul_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: mul_uint32_0, fnname: "mul_uint32_0", in: 4294967295, want: 0},
+ test_uint32{fn: mul_1_uint32, fnname: "mul_1_uint32", in: 0, want: 0},
+ test_uint32{fn: mul_uint32_1, fnname: "mul_uint32_1", in: 0, want: 0},
+ test_uint32{fn: mul_1_uint32, fnname: "mul_1_uint32", in: 1, want: 1},
+ test_uint32{fn: mul_uint32_1, fnname: "mul_uint32_1", in: 1, want: 1},
+ test_uint32{fn: mul_1_uint32, fnname: "mul_1_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: mul_uint32_1, fnname: "mul_uint32_1", in: 4294967295, want: 4294967295},
+ test_uint32{fn: mul_4294967295_uint32, fnname: "mul_4294967295_uint32", in: 0, want: 0},
+ test_uint32{fn: mul_uint32_4294967295, fnname: "mul_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: mul_4294967295_uint32, fnname: "mul_4294967295_uint32", in: 1, want: 4294967295},
+ test_uint32{fn: mul_uint32_4294967295, fnname: "mul_uint32_4294967295", in: 1, want: 4294967295},
+ test_uint32{fn: mul_4294967295_uint32, fnname: "mul_4294967295_uint32", in: 4294967295, want: 1},
+ test_uint32{fn: mul_uint32_4294967295, fnname: "mul_uint32_4294967295", in: 4294967295, want: 1},
+ test_uint32{fn: lsh_0_uint32, fnname: "lsh_0_uint32", in: 0, want: 0},
+ test_uint32{fn: lsh_uint32_0, fnname: "lsh_uint32_0", in: 0, want: 0},
+ test_uint32{fn: lsh_0_uint32, fnname: "lsh_0_uint32", in: 1, want: 0},
+ test_uint32{fn: lsh_uint32_0, fnname: "lsh_uint32_0", in: 1, want: 1},
+ test_uint32{fn: lsh_0_uint32, fnname: "lsh_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: lsh_uint32_0, fnname: "lsh_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: lsh_1_uint32, fnname: "lsh_1_uint32", in: 0, want: 1},
+ test_uint32{fn: lsh_uint32_1, fnname: "lsh_uint32_1", in: 0, want: 0},
+ test_uint32{fn: lsh_1_uint32, fnname: "lsh_1_uint32", in: 1, want: 2},
+ test_uint32{fn: lsh_uint32_1, fnname: "lsh_uint32_1", in: 1, want: 2},
+ test_uint32{fn: lsh_1_uint32, fnname: "lsh_1_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: lsh_uint32_1, fnname: "lsh_uint32_1", in: 4294967295, want: 4294967294},
+ test_uint32{fn: lsh_4294967295_uint32, fnname: "lsh_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: lsh_uint32_4294967295, fnname: "lsh_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: lsh_4294967295_uint32, fnname: "lsh_4294967295_uint32", in: 1, want: 4294967294},
+ test_uint32{fn: lsh_uint32_4294967295, fnname: "lsh_uint32_4294967295", in: 1, want: 0},
+ test_uint32{fn: lsh_4294967295_uint32, fnname: "lsh_4294967295_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: lsh_uint32_4294967295, fnname: "lsh_uint32_4294967295", in: 4294967295, want: 0},
+ test_uint32{fn: rsh_0_uint32, fnname: "rsh_0_uint32", in: 0, want: 0},
+ test_uint32{fn: rsh_uint32_0, fnname: "rsh_uint32_0", in: 0, want: 0},
+ test_uint32{fn: rsh_0_uint32, fnname: "rsh_0_uint32", in: 1, want: 0},
+ test_uint32{fn: rsh_uint32_0, fnname: "rsh_uint32_0", in: 1, want: 1},
+ test_uint32{fn: rsh_0_uint32, fnname: "rsh_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: rsh_uint32_0, fnname: "rsh_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: rsh_1_uint32, fnname: "rsh_1_uint32", in: 0, want: 1},
+ test_uint32{fn: rsh_uint32_1, fnname: "rsh_uint32_1", in: 0, want: 0},
+ test_uint32{fn: rsh_1_uint32, fnname: "rsh_1_uint32", in: 1, want: 0},
+ test_uint32{fn: rsh_uint32_1, fnname: "rsh_uint32_1", in: 1, want: 0},
+ test_uint32{fn: rsh_1_uint32, fnname: "rsh_1_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: rsh_uint32_1, fnname: "rsh_uint32_1", in: 4294967295, want: 2147483647},
+ test_uint32{fn: rsh_4294967295_uint32, fnname: "rsh_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: rsh_uint32_4294967295, fnname: "rsh_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: rsh_4294967295_uint32, fnname: "rsh_4294967295_uint32", in: 1, want: 2147483647},
+ test_uint32{fn: rsh_uint32_4294967295, fnname: "rsh_uint32_4294967295", in: 1, want: 0},
+ test_uint32{fn: rsh_4294967295_uint32, fnname: "rsh_4294967295_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: rsh_uint32_4294967295, fnname: "rsh_uint32_4294967295", in: 4294967295, want: 0},
+ test_uint32{fn: mod_0_uint32, fnname: "mod_0_uint32", in: 1, want: 0},
+ test_uint32{fn: mod_0_uint32, fnname: "mod_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: mod_uint32_1, fnname: "mod_uint32_1", in: 0, want: 0},
+ test_uint32{fn: mod_1_uint32, fnname: "mod_1_uint32", in: 1, want: 0},
+ test_uint32{fn: mod_uint32_1, fnname: "mod_uint32_1", in: 1, want: 0},
+ test_uint32{fn: mod_1_uint32, fnname: "mod_1_uint32", in: 4294967295, want: 1},
+ test_uint32{fn: mod_uint32_1, fnname: "mod_uint32_1", in: 4294967295, want: 0},
+ test_uint32{fn: mod_uint32_4294967295, fnname: "mod_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: mod_4294967295_uint32, fnname: "mod_4294967295_uint32", in: 1, want: 0},
+ test_uint32{fn: mod_uint32_4294967295, fnname: "mod_uint32_4294967295", in: 1, want: 1},
+ test_uint32{fn: mod_4294967295_uint32, fnname: "mod_4294967295_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: mod_uint32_4294967295, fnname: "mod_uint32_4294967295", in: 4294967295, want: 0},
+ test_uint32{fn: and_0_uint32, fnname: "and_0_uint32", in: 0, want: 0},
+ test_uint32{fn: and_uint32_0, fnname: "and_uint32_0", in: 0, want: 0},
+ test_uint32{fn: and_0_uint32, fnname: "and_0_uint32", in: 1, want: 0},
+ test_uint32{fn: and_uint32_0, fnname: "and_uint32_0", in: 1, want: 0},
+ test_uint32{fn: and_0_uint32, fnname: "and_0_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: and_uint32_0, fnname: "and_uint32_0", in: 4294967295, want: 0},
+ test_uint32{fn: and_1_uint32, fnname: "and_1_uint32", in: 0, want: 0},
+ test_uint32{fn: and_uint32_1, fnname: "and_uint32_1", in: 0, want: 0},
+ test_uint32{fn: and_1_uint32, fnname: "and_1_uint32", in: 1, want: 1},
+ test_uint32{fn: and_uint32_1, fnname: "and_uint32_1", in: 1, want: 1},
+ test_uint32{fn: and_1_uint32, fnname: "and_1_uint32", in: 4294967295, want: 1},
+ test_uint32{fn: and_uint32_1, fnname: "and_uint32_1", in: 4294967295, want: 1},
+ test_uint32{fn: and_4294967295_uint32, fnname: "and_4294967295_uint32", in: 0, want: 0},
+ test_uint32{fn: and_uint32_4294967295, fnname: "and_uint32_4294967295", in: 0, want: 0},
+ test_uint32{fn: and_4294967295_uint32, fnname: "and_4294967295_uint32", in: 1, want: 1},
+ test_uint32{fn: and_uint32_4294967295, fnname: "and_uint32_4294967295", in: 1, want: 1},
+ test_uint32{fn: and_4294967295_uint32, fnname: "and_4294967295_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: and_uint32_4294967295, fnname: "and_uint32_4294967295", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_0_uint32, fnname: "or_0_uint32", in: 0, want: 0},
+ test_uint32{fn: or_uint32_0, fnname: "or_uint32_0", in: 0, want: 0},
+ test_uint32{fn: or_0_uint32, fnname: "or_0_uint32", in: 1, want: 1},
+ test_uint32{fn: or_uint32_0, fnname: "or_uint32_0", in: 1, want: 1},
+ test_uint32{fn: or_0_uint32, fnname: "or_0_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_uint32_0, fnname: "or_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_1_uint32, fnname: "or_1_uint32", in: 0, want: 1},
+ test_uint32{fn: or_uint32_1, fnname: "or_uint32_1", in: 0, want: 1},
+ test_uint32{fn: or_1_uint32, fnname: "or_1_uint32", in: 1, want: 1},
+ test_uint32{fn: or_uint32_1, fnname: "or_uint32_1", in: 1, want: 1},
+ test_uint32{fn: or_1_uint32, fnname: "or_1_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_uint32_1, fnname: "or_uint32_1", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_4294967295_uint32, fnname: "or_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: or_uint32_4294967295, fnname: "or_uint32_4294967295", in: 0, want: 4294967295},
+ test_uint32{fn: or_4294967295_uint32, fnname: "or_4294967295_uint32", in: 1, want: 4294967295},
+ test_uint32{fn: or_uint32_4294967295, fnname: "or_uint32_4294967295", in: 1, want: 4294967295},
+ test_uint32{fn: or_4294967295_uint32, fnname: "or_4294967295_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: or_uint32_4294967295, fnname: "or_uint32_4294967295", in: 4294967295, want: 4294967295},
+ test_uint32{fn: xor_0_uint32, fnname: "xor_0_uint32", in: 0, want: 0},
+ test_uint32{fn: xor_uint32_0, fnname: "xor_uint32_0", in: 0, want: 0},
+ test_uint32{fn: xor_0_uint32, fnname: "xor_0_uint32", in: 1, want: 1},
+ test_uint32{fn: xor_uint32_0, fnname: "xor_uint32_0", in: 1, want: 1},
+ test_uint32{fn: xor_0_uint32, fnname: "xor_0_uint32", in: 4294967295, want: 4294967295},
+ test_uint32{fn: xor_uint32_0, fnname: "xor_uint32_0", in: 4294967295, want: 4294967295},
+ test_uint32{fn: xor_1_uint32, fnname: "xor_1_uint32", in: 0, want: 1},
+ test_uint32{fn: xor_uint32_1, fnname: "xor_uint32_1", in: 0, want: 1},
+ test_uint32{fn: xor_1_uint32, fnname: "xor_1_uint32", in: 1, want: 0},
+ test_uint32{fn: xor_uint32_1, fnname: "xor_uint32_1", in: 1, want: 0},
+ test_uint32{fn: xor_1_uint32, fnname: "xor_1_uint32", in: 4294967295, want: 4294967294},
+ test_uint32{fn: xor_uint32_1, fnname: "xor_uint32_1", in: 4294967295, want: 4294967294},
+ test_uint32{fn: xor_4294967295_uint32, fnname: "xor_4294967295_uint32", in: 0, want: 4294967295},
+ test_uint32{fn: xor_uint32_4294967295, fnname: "xor_uint32_4294967295", in: 0, want: 4294967295},
+ test_uint32{fn: xor_4294967295_uint32, fnname: "xor_4294967295_uint32", in: 1, want: 4294967294},
+ test_uint32{fn: xor_uint32_4294967295, fnname: "xor_uint32_4294967295", in: 1, want: 4294967294},
+ test_uint32{fn: xor_4294967295_uint32, fnname: "xor_4294967295_uint32", in: 4294967295, want: 0},
+ test_uint32{fn: xor_uint32_4294967295, fnname: "xor_uint32_4294967295", in: 4294967295, want: 0}}
+
+type test_uint32mul struct {
+ fn func(uint32) uint32
+ fnname string
+ in uint32
+ want uint32
+}
+
+var tests_uint32mul = []test_uint32{
+
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 3, want: 9},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 3, want: 9},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 5, want: 15},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 5, want: 15},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 7, want: 21},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 7, want: 21},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 9, want: 27},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 9, want: 27},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 10, want: 30},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 10, want: 30},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 11, want: 33},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 11, want: 33},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 13, want: 39},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 13, want: 39},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 19, want: 57},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 19, want: 57},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 21, want: 63},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 21, want: 63},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 25, want: 75},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 25, want: 75},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 27, want: 81},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 27, want: 81},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 37, want: 111},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 37, want: 111},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 41, want: 123},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 41, want: 123},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 45, want: 135},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 45, want: 135},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 73, want: 219},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 73, want: 219},
+ test_uint32{fn: mul_3_uint32, fnname: "mul_3_uint32", in: 81, want: 243},
+ test_uint32{fn: mul_uint32_3, fnname: "mul_uint32_3", in: 81, want: 243},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 3, want: 15},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 3, want: 15},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 5, want: 25},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 5, want: 25},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 7, want: 35},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 7, want: 35},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 9, want: 45},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 9, want: 45},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 10, want: 50},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 10, want: 50},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 11, want: 55},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 11, want: 55},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 13, want: 65},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 13, want: 65},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 19, want: 95},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 19, want: 95},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 21, want: 105},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 21, want: 105},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 25, want: 125},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 25, want: 125},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 27, want: 135},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 27, want: 135},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 37, want: 185},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 37, want: 185},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 41, want: 205},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 41, want: 205},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 45, want: 225},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 45, want: 225},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 73, want: 365},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 73, want: 365},
+ test_uint32{fn: mul_5_uint32, fnname: "mul_5_uint32", in: 81, want: 405},
+ test_uint32{fn: mul_uint32_5, fnname: "mul_uint32_5", in: 81, want: 405},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 3, want: 21},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 3, want: 21},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 5, want: 35},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 5, want: 35},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 7, want: 49},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 7, want: 49},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 9, want: 63},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 9, want: 63},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 10, want: 70},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 10, want: 70},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 11, want: 77},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 11, want: 77},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 13, want: 91},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 13, want: 91},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 19, want: 133},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 19, want: 133},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 21, want: 147},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 21, want: 147},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 25, want: 175},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 25, want: 175},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 27, want: 189},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 27, want: 189},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 37, want: 259},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 37, want: 259},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 41, want: 287},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 41, want: 287},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 45, want: 315},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 45, want: 315},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 73, want: 511},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 73, want: 511},
+ test_uint32{fn: mul_7_uint32, fnname: "mul_7_uint32", in: 81, want: 567},
+ test_uint32{fn: mul_uint32_7, fnname: "mul_uint32_7", in: 81, want: 567},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 3, want: 27},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 3, want: 27},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 5, want: 45},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 5, want: 45},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 7, want: 63},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 7, want: 63},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 9, want: 81},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 9, want: 81},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 10, want: 90},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 10, want: 90},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 11, want: 99},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 11, want: 99},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 13, want: 117},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 13, want: 117},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 19, want: 171},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 19, want: 171},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 21, want: 189},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 21, want: 189},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 25, want: 225},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 25, want: 225},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 27, want: 243},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 27, want: 243},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 37, want: 333},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 37, want: 333},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 41, want: 369},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 41, want: 369},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 45, want: 405},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 45, want: 405},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 73, want: 657},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 73, want: 657},
+ test_uint32{fn: mul_9_uint32, fnname: "mul_9_uint32", in: 81, want: 729},
+ test_uint32{fn: mul_uint32_9, fnname: "mul_uint32_9", in: 81, want: 729},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 3, want: 30},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 3, want: 30},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 5, want: 50},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 5, want: 50},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 7, want: 70},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 7, want: 70},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 9, want: 90},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 9, want: 90},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 10, want: 100},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 10, want: 100},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 11, want: 110},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 11, want: 110},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 13, want: 130},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 13, want: 130},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 19, want: 190},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 19, want: 190},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 21, want: 210},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 21, want: 210},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 25, want: 250},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 25, want: 250},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 27, want: 270},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 27, want: 270},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 37, want: 370},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 37, want: 370},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 41, want: 410},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 41, want: 410},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 45, want: 450},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 45, want: 450},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 73, want: 730},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 73, want: 730},
+ test_uint32{fn: mul_10_uint32, fnname: "mul_10_uint32", in: 81, want: 810},
+ test_uint32{fn: mul_uint32_10, fnname: "mul_uint32_10", in: 81, want: 810},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 3, want: 33},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 3, want: 33},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 5, want: 55},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 5, want: 55},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 7, want: 77},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 7, want: 77},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 9, want: 99},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 9, want: 99},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 10, want: 110},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 10, want: 110},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 11, want: 121},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 11, want: 121},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 13, want: 143},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 13, want: 143},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 19, want: 209},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 19, want: 209},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 21, want: 231},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 21, want: 231},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 25, want: 275},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 25, want: 275},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 27, want: 297},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 27, want: 297},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 37, want: 407},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 37, want: 407},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 41, want: 451},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 41, want: 451},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 45, want: 495},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 45, want: 495},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 73, want: 803},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 73, want: 803},
+ test_uint32{fn: mul_11_uint32, fnname: "mul_11_uint32", in: 81, want: 891},
+ test_uint32{fn: mul_uint32_11, fnname: "mul_uint32_11", in: 81, want: 891},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 3, want: 39},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 3, want: 39},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 5, want: 65},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 5, want: 65},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 7, want: 91},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 7, want: 91},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 9, want: 117},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 9, want: 117},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 10, want: 130},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 10, want: 130},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 11, want: 143},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 11, want: 143},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 13, want: 169},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 13, want: 169},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 19, want: 247},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 19, want: 247},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 21, want: 273},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 21, want: 273},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 25, want: 325},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 25, want: 325},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 27, want: 351},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 27, want: 351},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 37, want: 481},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 37, want: 481},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 41, want: 533},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 41, want: 533},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 45, want: 585},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 45, want: 585},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 73, want: 949},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 73, want: 949},
+ test_uint32{fn: mul_13_uint32, fnname: "mul_13_uint32", in: 81, want: 1053},
+ test_uint32{fn: mul_uint32_13, fnname: "mul_uint32_13", in: 81, want: 1053},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 3, want: 57},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 3, want: 57},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 5, want: 95},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 5, want: 95},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 7, want: 133},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 7, want: 133},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 9, want: 171},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 9, want: 171},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 10, want: 190},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 10, want: 190},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 11, want: 209},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 11, want: 209},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 13, want: 247},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 13, want: 247},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 19, want: 361},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 19, want: 361},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 21, want: 399},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 21, want: 399},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 25, want: 475},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 25, want: 475},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 27, want: 513},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 27, want: 513},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 37, want: 703},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 37, want: 703},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 41, want: 779},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 41, want: 779},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 45, want: 855},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 45, want: 855},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 73, want: 1387},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 73, want: 1387},
+ test_uint32{fn: mul_19_uint32, fnname: "mul_19_uint32", in: 81, want: 1539},
+ test_uint32{fn: mul_uint32_19, fnname: "mul_uint32_19", in: 81, want: 1539},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 3, want: 63},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 3, want: 63},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 5, want: 105},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 5, want: 105},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 7, want: 147},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 7, want: 147},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 9, want: 189},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 9, want: 189},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 10, want: 210},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 10, want: 210},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 11, want: 231},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 11, want: 231},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 13, want: 273},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 13, want: 273},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 19, want: 399},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 19, want: 399},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 21, want: 441},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 21, want: 441},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 25, want: 525},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 25, want: 525},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 27, want: 567},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 27, want: 567},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 37, want: 777},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 37, want: 777},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 41, want: 861},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 41, want: 861},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 45, want: 945},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 45, want: 945},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 73, want: 1533},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 73, want: 1533},
+ test_uint32{fn: mul_21_uint32, fnname: "mul_21_uint32", in: 81, want: 1701},
+ test_uint32{fn: mul_uint32_21, fnname: "mul_uint32_21", in: 81, want: 1701},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 3, want: 75},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 3, want: 75},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 5, want: 125},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 5, want: 125},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 7, want: 175},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 7, want: 175},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 9, want: 225},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 9, want: 225},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 10, want: 250},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 10, want: 250},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 11, want: 275},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 11, want: 275},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 13, want: 325},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 13, want: 325},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 19, want: 475},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 19, want: 475},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 21, want: 525},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 21, want: 525},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 25, want: 625},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 25, want: 625},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 27, want: 675},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 27, want: 675},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 37, want: 925},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 37, want: 925},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 41, want: 1025},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 41, want: 1025},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 45, want: 1125},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 45, want: 1125},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 73, want: 1825},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 73, want: 1825},
+ test_uint32{fn: mul_25_uint32, fnname: "mul_25_uint32", in: 81, want: 2025},
+ test_uint32{fn: mul_uint32_25, fnname: "mul_uint32_25", in: 81, want: 2025},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 3, want: 81},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 3, want: 81},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 5, want: 135},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 5, want: 135},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 7, want: 189},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 7, want: 189},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 9, want: 243},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 9, want: 243},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 10, want: 270},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 10, want: 270},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 11, want: 297},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 11, want: 297},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 13, want: 351},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 13, want: 351},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 19, want: 513},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 19, want: 513},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 21, want: 567},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 21, want: 567},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 25, want: 675},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 25, want: 675},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 27, want: 729},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 27, want: 729},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 37, want: 999},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 37, want: 999},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 41, want: 1107},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 41, want: 1107},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 45, want: 1215},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 45, want: 1215},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 73, want: 1971},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 73, want: 1971},
+ test_uint32{fn: mul_27_uint32, fnname: "mul_27_uint32", in: 81, want: 2187},
+ test_uint32{fn: mul_uint32_27, fnname: "mul_uint32_27", in: 81, want: 2187},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 3, want: 111},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 3, want: 111},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 5, want: 185},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 5, want: 185},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 7, want: 259},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 7, want: 259},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 9, want: 333},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 9, want: 333},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 10, want: 370},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 10, want: 370},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 11, want: 407},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 11, want: 407},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 13, want: 481},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 13, want: 481},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 19, want: 703},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 19, want: 703},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 21, want: 777},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 21, want: 777},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 25, want: 925},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 25, want: 925},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 27, want: 999},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 27, want: 999},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 37, want: 1369},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 37, want: 1369},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 41, want: 1517},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 41, want: 1517},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 45, want: 1665},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 45, want: 1665},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 73, want: 2701},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 73, want: 2701},
+ test_uint32{fn: mul_37_uint32, fnname: "mul_37_uint32", in: 81, want: 2997},
+ test_uint32{fn: mul_uint32_37, fnname: "mul_uint32_37", in: 81, want: 2997},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 3, want: 123},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 3, want: 123},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 5, want: 205},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 5, want: 205},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 7, want: 287},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 7, want: 287},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 9, want: 369},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 9, want: 369},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 10, want: 410},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 10, want: 410},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 11, want: 451},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 11, want: 451},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 13, want: 533},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 13, want: 533},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 19, want: 779},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 19, want: 779},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 21, want: 861},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 21, want: 861},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 25, want: 1025},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 25, want: 1025},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 27, want: 1107},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 27, want: 1107},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 37, want: 1517},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 37, want: 1517},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 41, want: 1681},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 41, want: 1681},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 45, want: 1845},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 45, want: 1845},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 73, want: 2993},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 73, want: 2993},
+ test_uint32{fn: mul_41_uint32, fnname: "mul_41_uint32", in: 81, want: 3321},
+ test_uint32{fn: mul_uint32_41, fnname: "mul_uint32_41", in: 81, want: 3321},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 3, want: 135},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 3, want: 135},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 5, want: 225},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 5, want: 225},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 7, want: 315},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 7, want: 315},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 9, want: 405},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 9, want: 405},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 10, want: 450},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 10, want: 450},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 11, want: 495},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 11, want: 495},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 13, want: 585},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 13, want: 585},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 19, want: 855},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 19, want: 855},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 21, want: 945},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 21, want: 945},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 25, want: 1125},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 25, want: 1125},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 27, want: 1215},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 27, want: 1215},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 37, want: 1665},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 37, want: 1665},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 41, want: 1845},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 41, want: 1845},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 45, want: 2025},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 45, want: 2025},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 73, want: 3285},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 73, want: 3285},
+ test_uint32{fn: mul_45_uint32, fnname: "mul_45_uint32", in: 81, want: 3645},
+ test_uint32{fn: mul_uint32_45, fnname: "mul_uint32_45", in: 81, want: 3645},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 3, want: 219},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 3, want: 219},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 5, want: 365},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 5, want: 365},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 7, want: 511},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 7, want: 511},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 9, want: 657},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 9, want: 657},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 10, want: 730},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 10, want: 730},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 11, want: 803},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 11, want: 803},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 13, want: 949},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 13, want: 949},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 19, want: 1387},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 19, want: 1387},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 21, want: 1533},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 21, want: 1533},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 25, want: 1825},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 25, want: 1825},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 27, want: 1971},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 27, want: 1971},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 37, want: 2701},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 37, want: 2701},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 41, want: 2993},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 41, want: 2993},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 45, want: 3285},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 45, want: 3285},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 73, want: 5329},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 73, want: 5329},
+ test_uint32{fn: mul_73_uint32, fnname: "mul_73_uint32", in: 81, want: 5913},
+ test_uint32{fn: mul_uint32_73, fnname: "mul_uint32_73", in: 81, want: 5913},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 3, want: 243},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 3, want: 243},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 5, want: 405},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 5, want: 405},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 7, want: 567},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 7, want: 567},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 9, want: 729},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 9, want: 729},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 10, want: 810},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 10, want: 810},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 11, want: 891},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 11, want: 891},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 13, want: 1053},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 13, want: 1053},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 19, want: 1539},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 19, want: 1539},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 21, want: 1701},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 21, want: 1701},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 25, want: 2025},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 25, want: 2025},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 27, want: 2187},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 27, want: 2187},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 37, want: 2997},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 37, want: 2997},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 41, want: 3321},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 41, want: 3321},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 45, want: 3645},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 45, want: 3645},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 73, want: 5913},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 73, want: 5913},
+ test_uint32{fn: mul_81_uint32, fnname: "mul_81_uint32", in: 81, want: 6561},
+ test_uint32{fn: mul_uint32_81, fnname: "mul_uint32_81", in: 81, want: 6561}}
+
+type test_int32 struct {
+ fn func(int32) int32
+ fnname string
+ in int32
+ want int32
+}
+
+var tests_int32 = []test_int32{
+
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: -2147483648, want: 0},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: -2147483648, want: 0},
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: -2147483647, want: 1},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: -2147483647, want: 1},
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: -1, want: 2147483647},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: -1, want: 2147483647},
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: 0, want: -2147483648},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: 0, want: -2147483648},
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: 1, want: -2147483647},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: 1, want: -2147483647},
+ test_int32{fn: add_Neg2147483648_int32, fnname: "add_Neg2147483648_int32", in: 2147483647, want: -1},
+ test_int32{fn: add_int32_Neg2147483648, fnname: "add_int32_Neg2147483648", in: 2147483647, want: -1},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: -2147483648, want: 1},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: -2147483648, want: 1},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: -2147483647, want: 2},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: -2147483647, want: 2},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: -1, want: -2147483648},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: -1, want: -2147483648},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: 0, want: -2147483647},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: 0, want: -2147483647},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: 1, want: -2147483646},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: 1, want: -2147483646},
+ test_int32{fn: add_Neg2147483647_int32, fnname: "add_Neg2147483647_int32", in: 2147483647, want: 0},
+ test_int32{fn: add_int32_Neg2147483647, fnname: "add_int32_Neg2147483647", in: 2147483647, want: 0},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: -2147483648, want: 2147483647},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: -2147483648, want: 2147483647},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: -2147483647, want: -2147483648},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: -2147483647, want: -2147483648},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: -1, want: -2},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: -1, want: -2},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: 0, want: -1},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: 0, want: -1},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: 1, want: 0},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: 1, want: 0},
+ test_int32{fn: add_Neg1_int32, fnname: "add_Neg1_int32", in: 2147483647, want: 2147483646},
+ test_int32{fn: add_int32_Neg1, fnname: "add_int32_Neg1", in: 2147483647, want: 2147483646},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: -2147483648, want: -2147483648},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: -2147483647, want: -2147483647},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: -1, want: -1},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: -1, want: -1},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: 0, want: 0},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: 0, want: 0},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: 1, want: 1},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: 1, want: 1},
+ test_int32{fn: add_0_int32, fnname: "add_0_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: add_int32_0, fnname: "add_int32_0", in: 2147483647, want: 2147483647},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: -2147483648, want: -2147483647},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: -2147483647, want: -2147483646},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: -2147483647, want: -2147483646},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: -1, want: 0},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: -1, want: 0},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: 0, want: 1},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: 0, want: 1},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: 1, want: 2},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: 1, want: 2},
+ test_int32{fn: add_1_int32, fnname: "add_1_int32", in: 2147483647, want: -2147483648},
+ test_int32{fn: add_int32_1, fnname: "add_int32_1", in: 2147483647, want: -2147483648},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: -2147483648, want: -1},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: -2147483648, want: -1},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: -2147483647, want: 0},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: -2147483647, want: 0},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: -1, want: 2147483646},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: -1, want: 2147483646},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: 0, want: 2147483647},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: 0, want: 2147483647},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: 1, want: -2147483648},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: 1, want: -2147483648},
+ test_int32{fn: add_2147483647_int32, fnname: "add_2147483647_int32", in: 2147483647, want: -2},
+ test_int32{fn: add_int32_2147483647, fnname: "add_int32_2147483647", in: 2147483647, want: -2},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: -2147483648, want: 0},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: -2147483648, want: 0},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: -2147483647, want: -1},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: -2147483647, want: 1},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: -1, want: -2147483647},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: -1, want: 2147483647},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: 0, want: -2147483648},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: 0, want: -2147483648},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: 1, want: 2147483647},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: 1, want: -2147483647},
+ test_int32{fn: sub_Neg2147483648_int32, fnname: "sub_Neg2147483648_int32", in: 2147483647, want: 1},
+ test_int32{fn: sub_int32_Neg2147483648, fnname: "sub_int32_Neg2147483648", in: 2147483647, want: -1},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: -2147483648, want: 1},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: -2147483648, want: -1},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: -2147483647, want: 0},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: -2147483647, want: 0},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: -1, want: -2147483646},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: -1, want: 2147483646},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: 0, want: -2147483647},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: 0, want: 2147483647},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: 1, want: -2147483648},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: 1, want: -2147483648},
+ test_int32{fn: sub_Neg2147483647_int32, fnname: "sub_Neg2147483647_int32", in: 2147483647, want: 2},
+ test_int32{fn: sub_int32_Neg2147483647, fnname: "sub_int32_Neg2147483647", in: 2147483647, want: -2},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: -2147483648, want: 2147483647},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: -2147483648, want: -2147483647},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: -2147483647, want: 2147483646},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: -2147483647, want: -2147483646},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: -1, want: 0},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: -1, want: 0},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: 0, want: -1},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: 0, want: 1},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: 1, want: -2},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: 1, want: 2},
+ test_int32{fn: sub_Neg1_int32, fnname: "sub_Neg1_int32", in: 2147483647, want: -2147483648},
+ test_int32{fn: sub_int32_Neg1, fnname: "sub_int32_Neg1", in: 2147483647, want: -2147483648},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: -2147483648, want: -2147483648},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: -2147483647, want: 2147483647},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: -2147483647, want: -2147483647},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: -1, want: 1},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: -1, want: -1},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: 0, want: 0},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: 0, want: 0},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: 1, want: -1},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: 1, want: 1},
+ test_int32{fn: sub_0_int32, fnname: "sub_0_int32", in: 2147483647, want: -2147483647},
+ test_int32{fn: sub_int32_0, fnname: "sub_int32_0", in: 2147483647, want: 2147483647},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: -2147483648, want: 2147483647},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: -2147483647, want: -2147483648},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: -2147483647, want: -2147483648},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: -1, want: 2},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: -1, want: -2},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: 0, want: 1},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: 0, want: -1},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: 1, want: 0},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: 1, want: 0},
+ test_int32{fn: sub_1_int32, fnname: "sub_1_int32", in: 2147483647, want: -2147483646},
+ test_int32{fn: sub_int32_1, fnname: "sub_int32_1", in: 2147483647, want: 2147483646},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: -2147483648, want: -1},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: -2147483648, want: 1},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: -2147483647, want: -2},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: -2147483647, want: 2},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: -1, want: -2147483648},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: -1, want: -2147483648},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: 0, want: 2147483647},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: 0, want: -2147483647},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: 1, want: 2147483646},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: 1, want: -2147483646},
+ test_int32{fn: sub_2147483647_int32, fnname: "sub_2147483647_int32", in: 2147483647, want: 0},
+ test_int32{fn: sub_int32_2147483647, fnname: "sub_int32_2147483647", in: 2147483647, want: 0},
+ test_int32{fn: div_Neg2147483648_int32, fnname: "div_Neg2147483648_int32", in: -2147483648, want: 1},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: -2147483648, want: 1},
+ test_int32{fn: div_Neg2147483648_int32, fnname: "div_Neg2147483648_int32", in: -2147483647, want: 1},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: -2147483647, want: 0},
+ test_int32{fn: div_Neg2147483648_int32, fnname: "div_Neg2147483648_int32", in: -1, want: -2147483648},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: -1, want: 0},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: 0, want: 0},
+ test_int32{fn: div_Neg2147483648_int32, fnname: "div_Neg2147483648_int32", in: 1, want: -2147483648},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: 1, want: 0},
+ test_int32{fn: div_Neg2147483648_int32, fnname: "div_Neg2147483648_int32", in: 2147483647, want: -1},
+ test_int32{fn: div_int32_Neg2147483648, fnname: "div_int32_Neg2147483648", in: 2147483647, want: 0},
+ test_int32{fn: div_Neg2147483647_int32, fnname: "div_Neg2147483647_int32", in: -2147483648, want: 0},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: -2147483648, want: 1},
+ test_int32{fn: div_Neg2147483647_int32, fnname: "div_Neg2147483647_int32", in: -2147483647, want: 1},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: -2147483647, want: 1},
+ test_int32{fn: div_Neg2147483647_int32, fnname: "div_Neg2147483647_int32", in: -1, want: 2147483647},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: -1, want: 0},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: 0, want: 0},
+ test_int32{fn: div_Neg2147483647_int32, fnname: "div_Neg2147483647_int32", in: 1, want: -2147483647},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: 1, want: 0},
+ test_int32{fn: div_Neg2147483647_int32, fnname: "div_Neg2147483647_int32", in: 2147483647, want: -1},
+ test_int32{fn: div_int32_Neg2147483647, fnname: "div_int32_Neg2147483647", in: 2147483647, want: -1},
+ test_int32{fn: div_Neg1_int32, fnname: "div_Neg1_int32", in: -2147483648, want: 0},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: -2147483648, want: -2147483648},
+ test_int32{fn: div_Neg1_int32, fnname: "div_Neg1_int32", in: -2147483647, want: 0},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: -2147483647, want: 2147483647},
+ test_int32{fn: div_Neg1_int32, fnname: "div_Neg1_int32", in: -1, want: 1},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: -1, want: 1},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: 0, want: 0},
+ test_int32{fn: div_Neg1_int32, fnname: "div_Neg1_int32", in: 1, want: -1},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: 1, want: -1},
+ test_int32{fn: div_Neg1_int32, fnname: "div_Neg1_int32", in: 2147483647, want: 0},
+ test_int32{fn: div_int32_Neg1, fnname: "div_int32_Neg1", in: 2147483647, want: -2147483647},
+ test_int32{fn: div_0_int32, fnname: "div_0_int32", in: -2147483648, want: 0},
+ test_int32{fn: div_0_int32, fnname: "div_0_int32", in: -2147483647, want: 0},
+ test_int32{fn: div_0_int32, fnname: "div_0_int32", in: -1, want: 0},
+ test_int32{fn: div_0_int32, fnname: "div_0_int32", in: 1, want: 0},
+ test_int32{fn: div_0_int32, fnname: "div_0_int32", in: 2147483647, want: 0},
+ test_int32{fn: div_1_int32, fnname: "div_1_int32", in: -2147483648, want: 0},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: -2147483648, want: -2147483648},
+ test_int32{fn: div_1_int32, fnname: "div_1_int32", in: -2147483647, want: 0},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: -2147483647, want: -2147483647},
+ test_int32{fn: div_1_int32, fnname: "div_1_int32", in: -1, want: -1},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: -1, want: -1},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: 0, want: 0},
+ test_int32{fn: div_1_int32, fnname: "div_1_int32", in: 1, want: 1},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: 1, want: 1},
+ test_int32{fn: div_1_int32, fnname: "div_1_int32", in: 2147483647, want: 0},
+ test_int32{fn: div_int32_1, fnname: "div_int32_1", in: 2147483647, want: 2147483647},
+ test_int32{fn: div_2147483647_int32, fnname: "div_2147483647_int32", in: -2147483648, want: 0},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: -2147483648, want: -1},
+ test_int32{fn: div_2147483647_int32, fnname: "div_2147483647_int32", in: -2147483647, want: -1},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: -2147483647, want: -1},
+ test_int32{fn: div_2147483647_int32, fnname: "div_2147483647_int32", in: -1, want: -2147483647},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: -1, want: 0},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: 0, want: 0},
+ test_int32{fn: div_2147483647_int32, fnname: "div_2147483647_int32", in: 1, want: 2147483647},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: 1, want: 0},
+ test_int32{fn: div_2147483647_int32, fnname: "div_2147483647_int32", in: 2147483647, want: 1},
+ test_int32{fn: div_int32_2147483647, fnname: "div_int32_2147483647", in: 2147483647, want: 1},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: -2147483648, want: 0},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: -2147483648, want: 0},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: -2147483647, want: -2147483648},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: -2147483647, want: -2147483648},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: -1, want: -2147483648},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: -1, want: -2147483648},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: 0, want: 0},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: 1, want: -2147483648},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: 1, want: -2147483648},
+ test_int32{fn: mul_Neg2147483648_int32, fnname: "mul_Neg2147483648_int32", in: 2147483647, want: -2147483648},
+ test_int32{fn: mul_int32_Neg2147483648, fnname: "mul_int32_Neg2147483648", in: 2147483647, want: -2147483648},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: -2147483647, want: 1},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: -2147483647, want: 1},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: -1, want: 2147483647},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: -1, want: 2147483647},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: 0, want: 0},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: 1, want: -2147483647},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: 1, want: -2147483647},
+ test_int32{fn: mul_Neg2147483647_int32, fnname: "mul_Neg2147483647_int32", in: 2147483647, want: -1},
+ test_int32{fn: mul_int32_Neg2147483647, fnname: "mul_int32_Neg2147483647", in: 2147483647, want: -1},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: -2147483647, want: 2147483647},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: -2147483647, want: 2147483647},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: -1, want: 1},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: -1, want: 1},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: 0, want: 0},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: 1, want: -1},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: 1, want: -1},
+ test_int32{fn: mul_Neg1_int32, fnname: "mul_Neg1_int32", in: 2147483647, want: -2147483647},
+ test_int32{fn: mul_int32_Neg1, fnname: "mul_int32_Neg1", in: 2147483647, want: -2147483647},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: -2147483648, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: -2147483648, want: 0},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: -2147483647, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: -2147483647, want: 0},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: -1, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: -1, want: 0},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: 0, want: 0},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: 1, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: 1, want: 0},
+ test_int32{fn: mul_0_int32, fnname: "mul_0_int32", in: 2147483647, want: 0},
+ test_int32{fn: mul_int32_0, fnname: "mul_int32_0", in: 2147483647, want: 0},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: -2147483647, want: -2147483647},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: -1, want: -1},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: -1, want: -1},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: 0, want: 0},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: 1, want: 1},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: 1, want: 1},
+ test_int32{fn: mul_1_int32, fnname: "mul_1_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: mul_int32_1, fnname: "mul_int32_1", in: 2147483647, want: 2147483647},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: -2147483648, want: -2147483648},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: -2147483647, want: -1},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: -2147483647, want: -1},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: -1, want: -2147483647},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: -1, want: -2147483647},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: 0, want: 0},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: 0, want: 0},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: 1, want: 2147483647},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: 1, want: 2147483647},
+ test_int32{fn: mul_2147483647_int32, fnname: "mul_2147483647_int32", in: 2147483647, want: 1},
+ test_int32{fn: mul_int32_2147483647, fnname: "mul_int32_2147483647", in: 2147483647, want: 1},
+ test_int32{fn: mod_Neg2147483648_int32, fnname: "mod_Neg2147483648_int32", in: -2147483648, want: 0},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: -2147483648, want: 0},
+ test_int32{fn: mod_Neg2147483648_int32, fnname: "mod_Neg2147483648_int32", in: -2147483647, want: -1},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: -2147483647, want: -2147483647},
+ test_int32{fn: mod_Neg2147483648_int32, fnname: "mod_Neg2147483648_int32", in: -1, want: 0},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: -1, want: -1},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: 0, want: 0},
+ test_int32{fn: mod_Neg2147483648_int32, fnname: "mod_Neg2147483648_int32", in: 1, want: 0},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: 1, want: 1},
+ test_int32{fn: mod_Neg2147483648_int32, fnname: "mod_Neg2147483648_int32", in: 2147483647, want: -1},
+ test_int32{fn: mod_int32_Neg2147483648, fnname: "mod_int32_Neg2147483648", in: 2147483647, want: 2147483647},
+ test_int32{fn: mod_Neg2147483647_int32, fnname: "mod_Neg2147483647_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: -2147483648, want: -1},
+ test_int32{fn: mod_Neg2147483647_int32, fnname: "mod_Neg2147483647_int32", in: -2147483647, want: 0},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: -2147483647, want: 0},
+ test_int32{fn: mod_Neg2147483647_int32, fnname: "mod_Neg2147483647_int32", in: -1, want: 0},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: -1, want: -1},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: 0, want: 0},
+ test_int32{fn: mod_Neg2147483647_int32, fnname: "mod_Neg2147483647_int32", in: 1, want: 0},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: 1, want: 1},
+ test_int32{fn: mod_Neg2147483647_int32, fnname: "mod_Neg2147483647_int32", in: 2147483647, want: 0},
+ test_int32{fn: mod_int32_Neg2147483647, fnname: "mod_int32_Neg2147483647", in: 2147483647, want: 0},
+ test_int32{fn: mod_Neg1_int32, fnname: "mod_Neg1_int32", in: -2147483648, want: -1},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: -2147483648, want: 0},
+ test_int32{fn: mod_Neg1_int32, fnname: "mod_Neg1_int32", in: -2147483647, want: -1},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: -2147483647, want: 0},
+ test_int32{fn: mod_Neg1_int32, fnname: "mod_Neg1_int32", in: -1, want: 0},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: -1, want: 0},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: 0, want: 0},
+ test_int32{fn: mod_Neg1_int32, fnname: "mod_Neg1_int32", in: 1, want: 0},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: 1, want: 0},
+ test_int32{fn: mod_Neg1_int32, fnname: "mod_Neg1_int32", in: 2147483647, want: -1},
+ test_int32{fn: mod_int32_Neg1, fnname: "mod_int32_Neg1", in: 2147483647, want: 0},
+ test_int32{fn: mod_0_int32, fnname: "mod_0_int32", in: -2147483648, want: 0},
+ test_int32{fn: mod_0_int32, fnname: "mod_0_int32", in: -2147483647, want: 0},
+ test_int32{fn: mod_0_int32, fnname: "mod_0_int32", in: -1, want: 0},
+ test_int32{fn: mod_0_int32, fnname: "mod_0_int32", in: 1, want: 0},
+ test_int32{fn: mod_0_int32, fnname: "mod_0_int32", in: 2147483647, want: 0},
+ test_int32{fn: mod_1_int32, fnname: "mod_1_int32", in: -2147483648, want: 1},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: -2147483648, want: 0},
+ test_int32{fn: mod_1_int32, fnname: "mod_1_int32", in: -2147483647, want: 1},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: -2147483647, want: 0},
+ test_int32{fn: mod_1_int32, fnname: "mod_1_int32", in: -1, want: 0},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: -1, want: 0},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: 0, want: 0},
+ test_int32{fn: mod_1_int32, fnname: "mod_1_int32", in: 1, want: 0},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: 1, want: 0},
+ test_int32{fn: mod_1_int32, fnname: "mod_1_int32", in: 2147483647, want: 1},
+ test_int32{fn: mod_int32_1, fnname: "mod_int32_1", in: 2147483647, want: 0},
+ test_int32{fn: mod_2147483647_int32, fnname: "mod_2147483647_int32", in: -2147483648, want: 2147483647},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: -2147483648, want: -1},
+ test_int32{fn: mod_2147483647_int32, fnname: "mod_2147483647_int32", in: -2147483647, want: 0},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: -2147483647, want: 0},
+ test_int32{fn: mod_2147483647_int32, fnname: "mod_2147483647_int32", in: -1, want: 0},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: -1, want: -1},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: 0, want: 0},
+ test_int32{fn: mod_2147483647_int32, fnname: "mod_2147483647_int32", in: 1, want: 0},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: 1, want: 1},
+ test_int32{fn: mod_2147483647_int32, fnname: "mod_2147483647_int32", in: 2147483647, want: 0},
+ test_int32{fn: mod_int32_2147483647, fnname: "mod_int32_2147483647", in: 2147483647, want: 0},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: -2147483647, want: -2147483648},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: -2147483647, want: -2147483648},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: -1, want: -2147483648},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: -1, want: -2147483648},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: 0, want: 0},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: 1, want: 0},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: 1, want: 0},
+ test_int32{fn: and_Neg2147483648_int32, fnname: "and_Neg2147483648_int32", in: 2147483647, want: 0},
+ test_int32{fn: and_int32_Neg2147483648, fnname: "and_int32_Neg2147483648", in: 2147483647, want: 0},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: -2147483647, want: -2147483647},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: -1, want: -2147483647},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: -1, want: -2147483647},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: 0, want: 0},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: 1, want: 1},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: 1, want: 1},
+ test_int32{fn: and_Neg2147483647_int32, fnname: "and_Neg2147483647_int32", in: 2147483647, want: 1},
+ test_int32{fn: and_int32_Neg2147483647, fnname: "and_int32_Neg2147483647", in: 2147483647, want: 1},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: -2147483648, want: -2147483648},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: -2147483647, want: -2147483647},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: -1, want: -1},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: -1, want: -1},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: 0, want: 0},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: 1, want: 1},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: 1, want: 1},
+ test_int32{fn: and_Neg1_int32, fnname: "and_Neg1_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: and_int32_Neg1, fnname: "and_int32_Neg1", in: 2147483647, want: 2147483647},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: -2147483648, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: -2147483648, want: 0},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: -2147483647, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: -2147483647, want: 0},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: -1, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: -1, want: 0},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: 0, want: 0},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: 1, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: 1, want: 0},
+ test_int32{fn: and_0_int32, fnname: "and_0_int32", in: 2147483647, want: 0},
+ test_int32{fn: and_int32_0, fnname: "and_int32_0", in: 2147483647, want: 0},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: -2147483648, want: 0},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: -2147483648, want: 0},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: -2147483647, want: 1},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: -2147483647, want: 1},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: -1, want: 1},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: -1, want: 1},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: 0, want: 0},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: 1, want: 1},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: 1, want: 1},
+ test_int32{fn: and_1_int32, fnname: "and_1_int32", in: 2147483647, want: 1},
+ test_int32{fn: and_int32_1, fnname: "and_int32_1", in: 2147483647, want: 1},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: -2147483648, want: 0},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: -2147483648, want: 0},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: -2147483647, want: 1},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: -2147483647, want: 1},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: -1, want: 2147483647},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: -1, want: 2147483647},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: 0, want: 0},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: 0, want: 0},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: 1, want: 1},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: 1, want: 1},
+ test_int32{fn: and_2147483647_int32, fnname: "and_2147483647_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: and_int32_2147483647, fnname: "and_int32_2147483647", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: -2147483648, want: -2147483648},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: -1, want: -1},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: 0, want: -2147483648},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: 0, want: -2147483648},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: 1, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: 1, want: -2147483647},
+ test_int32{fn: or_Neg2147483648_int32, fnname: "or_Neg2147483648_int32", in: 2147483647, want: -1},
+ test_int32{fn: or_int32_Neg2147483648, fnname: "or_int32_Neg2147483648", in: 2147483647, want: -1},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: -2147483648, want: -2147483647},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: -1, want: -1},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: 0, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: 0, want: -2147483647},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: 1, want: -2147483647},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: 1, want: -2147483647},
+ test_int32{fn: or_Neg2147483647_int32, fnname: "or_Neg2147483647_int32", in: 2147483647, want: -1},
+ test_int32{fn: or_int32_Neg2147483647, fnname: "or_int32_Neg2147483647", in: 2147483647, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: -2147483648, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: -2147483648, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: -2147483647, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: -2147483647, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: -1, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: 0, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: 0, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: 1, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: 1, want: -1},
+ test_int32{fn: or_Neg1_int32, fnname: "or_Neg1_int32", in: 2147483647, want: -1},
+ test_int32{fn: or_int32_Neg1, fnname: "or_int32_Neg1", in: 2147483647, want: -1},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: -2147483648, want: -2147483648},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: -1, want: -1},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: 0, want: 0},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: 0, want: 0},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: 1, want: 1},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: 1, want: 1},
+ test_int32{fn: or_0_int32, fnname: "or_0_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_int32_0, fnname: "or_int32_0", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: -2147483648, want: -2147483647},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: -2147483647, want: -2147483647},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: -1, want: -1},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: 0, want: 1},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: 0, want: 1},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: 1, want: 1},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: 1, want: 1},
+ test_int32{fn: or_1_int32, fnname: "or_1_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_int32_1, fnname: "or_int32_1", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: -2147483648, want: -1},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: -2147483648, want: -1},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: -2147483647, want: -1},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: -2147483647, want: -1},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: -1, want: -1},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: -1, want: -1},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: 0, want: 2147483647},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: 0, want: 2147483647},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: 1, want: 2147483647},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: 1, want: 2147483647},
+ test_int32{fn: or_2147483647_int32, fnname: "or_2147483647_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: or_int32_2147483647, fnname: "or_int32_2147483647", in: 2147483647, want: 2147483647},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: -2147483648, want: 0},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: -2147483648, want: 0},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: -2147483647, want: 1},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: -2147483647, want: 1},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: -1, want: 2147483647},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: -1, want: 2147483647},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: 0, want: -2147483648},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: 0, want: -2147483648},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: 1, want: -2147483647},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: 1, want: -2147483647},
+ test_int32{fn: xor_Neg2147483648_int32, fnname: "xor_Neg2147483648_int32", in: 2147483647, want: -1},
+ test_int32{fn: xor_int32_Neg2147483648, fnname: "xor_int32_Neg2147483648", in: 2147483647, want: -1},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: -2147483648, want: 1},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: -2147483648, want: 1},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: -2147483647, want: 0},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: -2147483647, want: 0},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: -1, want: 2147483646},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: -1, want: 2147483646},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: 0, want: -2147483647},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: 0, want: -2147483647},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: 1, want: -2147483648},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: 1, want: -2147483648},
+ test_int32{fn: xor_Neg2147483647_int32, fnname: "xor_Neg2147483647_int32", in: 2147483647, want: -2},
+ test_int32{fn: xor_int32_Neg2147483647, fnname: "xor_int32_Neg2147483647", in: 2147483647, want: -2},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: -2147483648, want: 2147483647},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: -2147483648, want: 2147483647},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: -2147483647, want: 2147483646},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: -2147483647, want: 2147483646},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: -1, want: 0},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: -1, want: 0},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: 0, want: -1},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: 0, want: -1},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: 1, want: -2},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: 1, want: -2},
+ test_int32{fn: xor_Neg1_int32, fnname: "xor_Neg1_int32", in: 2147483647, want: -2147483648},
+ test_int32{fn: xor_int32_Neg1, fnname: "xor_int32_Neg1", in: 2147483647, want: -2147483648},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: -2147483648, want: -2147483648},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: -2147483648, want: -2147483648},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: -2147483647, want: -2147483647},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: -2147483647, want: -2147483647},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: -1, want: -1},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: -1, want: -1},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: 0, want: 0},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: 0, want: 0},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: 1, want: 1},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: 1, want: 1},
+ test_int32{fn: xor_0_int32, fnname: "xor_0_int32", in: 2147483647, want: 2147483647},
+ test_int32{fn: xor_int32_0, fnname: "xor_int32_0", in: 2147483647, want: 2147483647},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: -2147483648, want: -2147483647},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: -2147483648, want: -2147483647},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: -2147483647, want: -2147483648},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: -2147483647, want: -2147483648},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: -1, want: -2},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: -1, want: -2},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: 0, want: 1},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: 0, want: 1},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: 1, want: 0},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: 1, want: 0},
+ test_int32{fn: xor_1_int32, fnname: "xor_1_int32", in: 2147483647, want: 2147483646},
+ test_int32{fn: xor_int32_1, fnname: "xor_int32_1", in: 2147483647, want: 2147483646},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: -2147483648, want: -1},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: -2147483648, want: -1},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: -2147483647, want: -2},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: -2147483647, want: -2},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: -1, want: -2147483648},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: -1, want: -2147483648},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: 0, want: 2147483647},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: 0, want: 2147483647},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: 1, want: 2147483646},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: 1, want: 2147483646},
+ test_int32{fn: xor_2147483647_int32, fnname: "xor_2147483647_int32", in: 2147483647, want: 0},
+ test_int32{fn: xor_int32_2147483647, fnname: "xor_int32_2147483647", in: 2147483647, want: 0}}
+
+type test_int32mul struct {
+ fn func(int32) int32
+ fnname string
+ in int32
+ want int32
+}
+
+var tests_int32mul = []test_int32{
+
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: -9, want: 81},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: -9, want: 81},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: -5, want: 45},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: -5, want: 45},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: -3, want: 27},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: -3, want: 27},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 3, want: -27},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 3, want: -27},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 5, want: -45},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 5, want: -45},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 7, want: -63},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 7, want: -63},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 9, want: -81},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 9, want: -81},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 10, want: -90},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 10, want: -90},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 11, want: -99},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 11, want: -99},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 13, want: -117},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 13, want: -117},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 19, want: -171},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 19, want: -171},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 21, want: -189},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 21, want: -189},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 25, want: -225},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 25, want: -225},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 27, want: -243},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 27, want: -243},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 37, want: -333},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 37, want: -333},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 41, want: -369},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 41, want: -369},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 45, want: -405},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 45, want: -405},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 73, want: -657},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 73, want: -657},
+ test_int32{fn: mul_Neg9_int32, fnname: "mul_Neg9_int32", in: 81, want: -729},
+ test_int32{fn: mul_int32_Neg9, fnname: "mul_int32_Neg9", in: 81, want: -729},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: -9, want: 45},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: -9, want: 45},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: -5, want: 25},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: -5, want: 25},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: -3, want: 15},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: -3, want: 15},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 3, want: -15},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 3, want: -15},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 5, want: -25},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 5, want: -25},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 7, want: -35},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 7, want: -35},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 9, want: -45},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 9, want: -45},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 10, want: -50},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 10, want: -50},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 11, want: -55},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 11, want: -55},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 13, want: -65},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 13, want: -65},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 19, want: -95},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 19, want: -95},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 21, want: -105},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 21, want: -105},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 25, want: -125},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 25, want: -125},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 27, want: -135},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 27, want: -135},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 37, want: -185},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 37, want: -185},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 41, want: -205},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 41, want: -205},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 45, want: -225},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 45, want: -225},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 73, want: -365},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 73, want: -365},
+ test_int32{fn: mul_Neg5_int32, fnname: "mul_Neg5_int32", in: 81, want: -405},
+ test_int32{fn: mul_int32_Neg5, fnname: "mul_int32_Neg5", in: 81, want: -405},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: -9, want: 27},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: -9, want: 27},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: -5, want: 15},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: -5, want: 15},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: -3, want: 9},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: -3, want: 9},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 3, want: -9},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 3, want: -9},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 5, want: -15},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 5, want: -15},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 7, want: -21},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 7, want: -21},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 9, want: -27},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 9, want: -27},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 10, want: -30},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 10, want: -30},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 11, want: -33},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 11, want: -33},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 13, want: -39},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 13, want: -39},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 19, want: -57},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 19, want: -57},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 21, want: -63},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 21, want: -63},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 25, want: -75},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 25, want: -75},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 27, want: -81},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 27, want: -81},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 37, want: -111},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 37, want: -111},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 41, want: -123},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 41, want: -123},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 45, want: -135},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 45, want: -135},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 73, want: -219},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 73, want: -219},
+ test_int32{fn: mul_Neg3_int32, fnname: "mul_Neg3_int32", in: 81, want: -243},
+ test_int32{fn: mul_int32_Neg3, fnname: "mul_int32_Neg3", in: 81, want: -243},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: -9, want: -27},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: -9, want: -27},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: -5, want: -15},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: -5, want: -15},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: -3, want: -9},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: -3, want: -9},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 3, want: 9},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 3, want: 9},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 5, want: 15},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 5, want: 15},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 7, want: 21},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 7, want: 21},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 9, want: 27},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 9, want: 27},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 10, want: 30},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 10, want: 30},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 11, want: 33},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 11, want: 33},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 13, want: 39},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 13, want: 39},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 19, want: 57},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 19, want: 57},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 21, want: 63},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 21, want: 63},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 25, want: 75},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 25, want: 75},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 27, want: 81},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 27, want: 81},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 37, want: 111},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 37, want: 111},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 41, want: 123},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 41, want: 123},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 45, want: 135},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 45, want: 135},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 73, want: 219},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 73, want: 219},
+ test_int32{fn: mul_3_int32, fnname: "mul_3_int32", in: 81, want: 243},
+ test_int32{fn: mul_int32_3, fnname: "mul_int32_3", in: 81, want: 243},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: -9, want: -45},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: -9, want: -45},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: -5, want: -25},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: -5, want: -25},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: -3, want: -15},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: -3, want: -15},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 3, want: 15},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 3, want: 15},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 5, want: 25},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 5, want: 25},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 7, want: 35},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 7, want: 35},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 9, want: 45},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 9, want: 45},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 10, want: 50},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 10, want: 50},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 11, want: 55},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 11, want: 55},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 13, want: 65},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 13, want: 65},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 19, want: 95},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 19, want: 95},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 21, want: 105},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 21, want: 105},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 25, want: 125},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 25, want: 125},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 27, want: 135},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 27, want: 135},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 37, want: 185},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 37, want: 185},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 41, want: 205},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 41, want: 205},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 45, want: 225},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 45, want: 225},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 73, want: 365},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 73, want: 365},
+ test_int32{fn: mul_5_int32, fnname: "mul_5_int32", in: 81, want: 405},
+ test_int32{fn: mul_int32_5, fnname: "mul_int32_5", in: 81, want: 405},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: -9, want: -63},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: -9, want: -63},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: -5, want: -35},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: -5, want: -35},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: -3, want: -21},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: -3, want: -21},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 3, want: 21},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 3, want: 21},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 5, want: 35},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 5, want: 35},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 7, want: 49},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 7, want: 49},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 9, want: 63},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 9, want: 63},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 10, want: 70},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 10, want: 70},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 11, want: 77},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 11, want: 77},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 13, want: 91},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 13, want: 91},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 19, want: 133},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 19, want: 133},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 21, want: 147},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 21, want: 147},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 25, want: 175},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 25, want: 175},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 27, want: 189},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 27, want: 189},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 37, want: 259},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 37, want: 259},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 41, want: 287},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 41, want: 287},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 45, want: 315},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 45, want: 315},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 73, want: 511},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 73, want: 511},
+ test_int32{fn: mul_7_int32, fnname: "mul_7_int32", in: 81, want: 567},
+ test_int32{fn: mul_int32_7, fnname: "mul_int32_7", in: 81, want: 567},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: -9, want: -81},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: -9, want: -81},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: -5, want: -45},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: -5, want: -45},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: -3, want: -27},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: -3, want: -27},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 3, want: 27},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 3, want: 27},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 5, want: 45},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 5, want: 45},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 7, want: 63},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 7, want: 63},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 9, want: 81},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 9, want: 81},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 10, want: 90},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 10, want: 90},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 11, want: 99},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 11, want: 99},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 13, want: 117},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 13, want: 117},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 19, want: 171},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 19, want: 171},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 21, want: 189},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 21, want: 189},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 25, want: 225},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 25, want: 225},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 27, want: 243},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 27, want: 243},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 37, want: 333},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 37, want: 333},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 41, want: 369},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 41, want: 369},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 45, want: 405},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 45, want: 405},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 73, want: 657},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 73, want: 657},
+ test_int32{fn: mul_9_int32, fnname: "mul_9_int32", in: 81, want: 729},
+ test_int32{fn: mul_int32_9, fnname: "mul_int32_9", in: 81, want: 729},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: -9, want: -90},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: -9, want: -90},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: -5, want: -50},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: -5, want: -50},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: -3, want: -30},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: -3, want: -30},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 3, want: 30},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 3, want: 30},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 5, want: 50},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 5, want: 50},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 7, want: 70},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 7, want: 70},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 9, want: 90},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 9, want: 90},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 10, want: 100},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 10, want: 100},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 11, want: 110},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 11, want: 110},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 13, want: 130},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 13, want: 130},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 19, want: 190},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 19, want: 190},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 21, want: 210},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 21, want: 210},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 25, want: 250},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 25, want: 250},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 27, want: 270},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 27, want: 270},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 37, want: 370},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 37, want: 370},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 41, want: 410},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 41, want: 410},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 45, want: 450},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 45, want: 450},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 73, want: 730},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 73, want: 730},
+ test_int32{fn: mul_10_int32, fnname: "mul_10_int32", in: 81, want: 810},
+ test_int32{fn: mul_int32_10, fnname: "mul_int32_10", in: 81, want: 810},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: -9, want: -99},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: -9, want: -99},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: -5, want: -55},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: -5, want: -55},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: -3, want: -33},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: -3, want: -33},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 3, want: 33},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 3, want: 33},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 5, want: 55},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 5, want: 55},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 7, want: 77},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 7, want: 77},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 9, want: 99},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 9, want: 99},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 10, want: 110},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 10, want: 110},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 11, want: 121},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 11, want: 121},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 13, want: 143},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 13, want: 143},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 19, want: 209},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 19, want: 209},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 21, want: 231},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 21, want: 231},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 25, want: 275},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 25, want: 275},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 27, want: 297},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 27, want: 297},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 37, want: 407},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 37, want: 407},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 41, want: 451},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 41, want: 451},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 45, want: 495},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 45, want: 495},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 73, want: 803},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 73, want: 803},
+ test_int32{fn: mul_11_int32, fnname: "mul_11_int32", in: 81, want: 891},
+ test_int32{fn: mul_int32_11, fnname: "mul_int32_11", in: 81, want: 891},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: -9, want: -117},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: -9, want: -117},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: -5, want: -65},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: -5, want: -65},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: -3, want: -39},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: -3, want: -39},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 3, want: 39},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 3, want: 39},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 5, want: 65},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 5, want: 65},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 7, want: 91},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 7, want: 91},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 9, want: 117},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 9, want: 117},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 10, want: 130},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 10, want: 130},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 11, want: 143},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 11, want: 143},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 13, want: 169},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 13, want: 169},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 19, want: 247},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 19, want: 247},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 21, want: 273},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 21, want: 273},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 25, want: 325},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 25, want: 325},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 27, want: 351},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 27, want: 351},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 37, want: 481},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 37, want: 481},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 41, want: 533},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 41, want: 533},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 45, want: 585},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 45, want: 585},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 73, want: 949},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 73, want: 949},
+ test_int32{fn: mul_13_int32, fnname: "mul_13_int32", in: 81, want: 1053},
+ test_int32{fn: mul_int32_13, fnname: "mul_int32_13", in: 81, want: 1053},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: -9, want: -171},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: -9, want: -171},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: -5, want: -95},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: -5, want: -95},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: -3, want: -57},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: -3, want: -57},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 3, want: 57},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 3, want: 57},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 5, want: 95},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 5, want: 95},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 7, want: 133},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 7, want: 133},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 9, want: 171},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 9, want: 171},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 10, want: 190},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 10, want: 190},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 11, want: 209},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 11, want: 209},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 13, want: 247},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 13, want: 247},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 19, want: 361},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 19, want: 361},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 21, want: 399},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 21, want: 399},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 25, want: 475},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 25, want: 475},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 27, want: 513},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 27, want: 513},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 37, want: 703},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 37, want: 703},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 41, want: 779},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 41, want: 779},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 45, want: 855},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 45, want: 855},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 73, want: 1387},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 73, want: 1387},
+ test_int32{fn: mul_19_int32, fnname: "mul_19_int32", in: 81, want: 1539},
+ test_int32{fn: mul_int32_19, fnname: "mul_int32_19", in: 81, want: 1539},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: -9, want: -189},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: -9, want: -189},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: -5, want: -105},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: -5, want: -105},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: -3, want: -63},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: -3, want: -63},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 3, want: 63},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 3, want: 63},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 5, want: 105},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 5, want: 105},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 7, want: 147},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 7, want: 147},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 9, want: 189},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 9, want: 189},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 10, want: 210},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 10, want: 210},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 11, want: 231},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 11, want: 231},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 13, want: 273},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 13, want: 273},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 19, want: 399},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 19, want: 399},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 21, want: 441},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 21, want: 441},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 25, want: 525},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 25, want: 525},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 27, want: 567},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 27, want: 567},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 37, want: 777},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 37, want: 777},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 41, want: 861},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 41, want: 861},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 45, want: 945},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 45, want: 945},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 73, want: 1533},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 73, want: 1533},
+ test_int32{fn: mul_21_int32, fnname: "mul_21_int32", in: 81, want: 1701},
+ test_int32{fn: mul_int32_21, fnname: "mul_int32_21", in: 81, want: 1701},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: -9, want: -225},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: -9, want: -225},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: -5, want: -125},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: -5, want: -125},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: -3, want: -75},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: -3, want: -75},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 3, want: 75},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 3, want: 75},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 5, want: 125},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 5, want: 125},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 7, want: 175},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 7, want: 175},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 9, want: 225},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 9, want: 225},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 10, want: 250},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 10, want: 250},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 11, want: 275},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 11, want: 275},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 13, want: 325},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 13, want: 325},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 19, want: 475},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 19, want: 475},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 21, want: 525},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 21, want: 525},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 25, want: 625},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 25, want: 625},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 27, want: 675},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 27, want: 675},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 37, want: 925},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 37, want: 925},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 41, want: 1025},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 41, want: 1025},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 45, want: 1125},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 45, want: 1125},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 73, want: 1825},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 73, want: 1825},
+ test_int32{fn: mul_25_int32, fnname: "mul_25_int32", in: 81, want: 2025},
+ test_int32{fn: mul_int32_25, fnname: "mul_int32_25", in: 81, want: 2025},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: -9, want: -243},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: -9, want: -243},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: -5, want: -135},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: -5, want: -135},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: -3, want: -81},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: -3, want: -81},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 3, want: 81},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 3, want: 81},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 5, want: 135},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 5, want: 135},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 7, want: 189},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 7, want: 189},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 9, want: 243},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 9, want: 243},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 10, want: 270},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 10, want: 270},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 11, want: 297},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 11, want: 297},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 13, want: 351},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 13, want: 351},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 19, want: 513},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 19, want: 513},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 21, want: 567},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 21, want: 567},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 25, want: 675},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 25, want: 675},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 27, want: 729},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 27, want: 729},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 37, want: 999},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 37, want: 999},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 41, want: 1107},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 41, want: 1107},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 45, want: 1215},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 45, want: 1215},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 73, want: 1971},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 73, want: 1971},
+ test_int32{fn: mul_27_int32, fnname: "mul_27_int32", in: 81, want: 2187},
+ test_int32{fn: mul_int32_27, fnname: "mul_int32_27", in: 81, want: 2187},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: -9, want: -333},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: -9, want: -333},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: -5, want: -185},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: -5, want: -185},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: -3, want: -111},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: -3, want: -111},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 3, want: 111},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 3, want: 111},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 5, want: 185},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 5, want: 185},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 7, want: 259},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 7, want: 259},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 9, want: 333},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 9, want: 333},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 10, want: 370},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 10, want: 370},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 11, want: 407},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 11, want: 407},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 13, want: 481},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 13, want: 481},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 19, want: 703},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 19, want: 703},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 21, want: 777},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 21, want: 777},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 25, want: 925},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 25, want: 925},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 27, want: 999},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 27, want: 999},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 37, want: 1369},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 37, want: 1369},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 41, want: 1517},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 41, want: 1517},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 45, want: 1665},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 45, want: 1665},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 73, want: 2701},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 73, want: 2701},
+ test_int32{fn: mul_37_int32, fnname: "mul_37_int32", in: 81, want: 2997},
+ test_int32{fn: mul_int32_37, fnname: "mul_int32_37", in: 81, want: 2997},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: -9, want: -369},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: -9, want: -369},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: -5, want: -205},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: -5, want: -205},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: -3, want: -123},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: -3, want: -123},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 3, want: 123},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 3, want: 123},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 5, want: 205},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 5, want: 205},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 7, want: 287},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 7, want: 287},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 9, want: 369},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 9, want: 369},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 10, want: 410},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 10, want: 410},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 11, want: 451},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 11, want: 451},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 13, want: 533},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 13, want: 533},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 19, want: 779},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 19, want: 779},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 21, want: 861},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 21, want: 861},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 25, want: 1025},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 25, want: 1025},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 27, want: 1107},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 27, want: 1107},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 37, want: 1517},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 37, want: 1517},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 41, want: 1681},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 41, want: 1681},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 45, want: 1845},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 45, want: 1845},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 73, want: 2993},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 73, want: 2993},
+ test_int32{fn: mul_41_int32, fnname: "mul_41_int32", in: 81, want: 3321},
+ test_int32{fn: mul_int32_41, fnname: "mul_int32_41", in: 81, want: 3321},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: -9, want: -405},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: -9, want: -405},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: -5, want: -225},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: -5, want: -225},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: -3, want: -135},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: -3, want: -135},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 3, want: 135},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 3, want: 135},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 5, want: 225},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 5, want: 225},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 7, want: 315},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 7, want: 315},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 9, want: 405},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 9, want: 405},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 10, want: 450},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 10, want: 450},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 11, want: 495},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 11, want: 495},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 13, want: 585},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 13, want: 585},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 19, want: 855},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 19, want: 855},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 21, want: 945},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 21, want: 945},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 25, want: 1125},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 25, want: 1125},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 27, want: 1215},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 27, want: 1215},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 37, want: 1665},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 37, want: 1665},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 41, want: 1845},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 41, want: 1845},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 45, want: 2025},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 45, want: 2025},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 73, want: 3285},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 73, want: 3285},
+ test_int32{fn: mul_45_int32, fnname: "mul_45_int32", in: 81, want: 3645},
+ test_int32{fn: mul_int32_45, fnname: "mul_int32_45", in: 81, want: 3645},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: -9, want: -657},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: -9, want: -657},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: -5, want: -365},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: -5, want: -365},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: -3, want: -219},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: -3, want: -219},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 3, want: 219},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 3, want: 219},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 5, want: 365},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 5, want: 365},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 7, want: 511},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 7, want: 511},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 9, want: 657},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 9, want: 657},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 10, want: 730},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 10, want: 730},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 11, want: 803},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 11, want: 803},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 13, want: 949},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 13, want: 949},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 19, want: 1387},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 19, want: 1387},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 21, want: 1533},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 21, want: 1533},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 25, want: 1825},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 25, want: 1825},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 27, want: 1971},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 27, want: 1971},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 37, want: 2701},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 37, want: 2701},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 41, want: 2993},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 41, want: 2993},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 45, want: 3285},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 45, want: 3285},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 73, want: 5329},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 73, want: 5329},
+ test_int32{fn: mul_73_int32, fnname: "mul_73_int32", in: 81, want: 5913},
+ test_int32{fn: mul_int32_73, fnname: "mul_int32_73", in: 81, want: 5913},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: -9, want: -729},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: -9, want: -729},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: -5, want: -405},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: -5, want: -405},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: -3, want: -243},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: -3, want: -243},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 3, want: 243},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 3, want: 243},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 5, want: 405},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 5, want: 405},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 7, want: 567},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 7, want: 567},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 9, want: 729},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 9, want: 729},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 10, want: 810},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 10, want: 810},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 11, want: 891},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 11, want: 891},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 13, want: 1053},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 13, want: 1053},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 19, want: 1539},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 19, want: 1539},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 21, want: 1701},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 21, want: 1701},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 25, want: 2025},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 25, want: 2025},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 27, want: 2187},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 27, want: 2187},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 37, want: 2997},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 37, want: 2997},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 41, want: 3321},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 41, want: 3321},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 45, want: 3645},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 45, want: 3645},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 73, want: 5913},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 73, want: 5913},
+ test_int32{fn: mul_81_int32, fnname: "mul_81_int32", in: 81, want: 6561},
+ test_int32{fn: mul_int32_81, fnname: "mul_int32_81", in: 81, want: 6561}}
+
+type test_uint16 struct {
+ fn func(uint16) uint16
+ fnname string
+ in uint16
+ want uint16
+}
+
+var tests_uint16 = []test_uint16{
+
+ test_uint16{fn: add_0_uint16, fnname: "add_0_uint16", in: 0, want: 0},
+ test_uint16{fn: add_uint16_0, fnname: "add_uint16_0", in: 0, want: 0},
+ test_uint16{fn: add_0_uint16, fnname: "add_0_uint16", in: 1, want: 1},
+ test_uint16{fn: add_uint16_0, fnname: "add_uint16_0", in: 1, want: 1},
+ test_uint16{fn: add_0_uint16, fnname: "add_0_uint16", in: 65535, want: 65535},
+ test_uint16{fn: add_uint16_0, fnname: "add_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: add_1_uint16, fnname: "add_1_uint16", in: 0, want: 1},
+ test_uint16{fn: add_uint16_1, fnname: "add_uint16_1", in: 0, want: 1},
+ test_uint16{fn: add_1_uint16, fnname: "add_1_uint16", in: 1, want: 2},
+ test_uint16{fn: add_uint16_1, fnname: "add_uint16_1", in: 1, want: 2},
+ test_uint16{fn: add_1_uint16, fnname: "add_1_uint16", in: 65535, want: 0},
+ test_uint16{fn: add_uint16_1, fnname: "add_uint16_1", in: 65535, want: 0},
+ test_uint16{fn: add_65535_uint16, fnname: "add_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: add_uint16_65535, fnname: "add_uint16_65535", in: 0, want: 65535},
+ test_uint16{fn: add_65535_uint16, fnname: "add_65535_uint16", in: 1, want: 0},
+ test_uint16{fn: add_uint16_65535, fnname: "add_uint16_65535", in: 1, want: 0},
+ test_uint16{fn: add_65535_uint16, fnname: "add_65535_uint16", in: 65535, want: 65534},
+ test_uint16{fn: add_uint16_65535, fnname: "add_uint16_65535", in: 65535, want: 65534},
+ test_uint16{fn: sub_0_uint16, fnname: "sub_0_uint16", in: 0, want: 0},
+ test_uint16{fn: sub_uint16_0, fnname: "sub_uint16_0", in: 0, want: 0},
+ test_uint16{fn: sub_0_uint16, fnname: "sub_0_uint16", in: 1, want: 65535},
+ test_uint16{fn: sub_uint16_0, fnname: "sub_uint16_0", in: 1, want: 1},
+ test_uint16{fn: sub_0_uint16, fnname: "sub_0_uint16", in: 65535, want: 1},
+ test_uint16{fn: sub_uint16_0, fnname: "sub_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: sub_1_uint16, fnname: "sub_1_uint16", in: 0, want: 1},
+ test_uint16{fn: sub_uint16_1, fnname: "sub_uint16_1", in: 0, want: 65535},
+ test_uint16{fn: sub_1_uint16, fnname: "sub_1_uint16", in: 1, want: 0},
+ test_uint16{fn: sub_uint16_1, fnname: "sub_uint16_1", in: 1, want: 0},
+ test_uint16{fn: sub_1_uint16, fnname: "sub_1_uint16", in: 65535, want: 2},
+ test_uint16{fn: sub_uint16_1, fnname: "sub_uint16_1", in: 65535, want: 65534},
+ test_uint16{fn: sub_65535_uint16, fnname: "sub_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: sub_uint16_65535, fnname: "sub_uint16_65535", in: 0, want: 1},
+ test_uint16{fn: sub_65535_uint16, fnname: "sub_65535_uint16", in: 1, want: 65534},
+ test_uint16{fn: sub_uint16_65535, fnname: "sub_uint16_65535", in: 1, want: 2},
+ test_uint16{fn: sub_65535_uint16, fnname: "sub_65535_uint16", in: 65535, want: 0},
+ test_uint16{fn: sub_uint16_65535, fnname: "sub_uint16_65535", in: 65535, want: 0},
+ test_uint16{fn: div_0_uint16, fnname: "div_0_uint16", in: 1, want: 0},
+ test_uint16{fn: div_0_uint16, fnname: "div_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: div_uint16_1, fnname: "div_uint16_1", in: 0, want: 0},
+ test_uint16{fn: div_1_uint16, fnname: "div_1_uint16", in: 1, want: 1},
+ test_uint16{fn: div_uint16_1, fnname: "div_uint16_1", in: 1, want: 1},
+ test_uint16{fn: div_1_uint16, fnname: "div_1_uint16", in: 65535, want: 0},
+ test_uint16{fn: div_uint16_1, fnname: "div_uint16_1", in: 65535, want: 65535},
+ test_uint16{fn: div_uint16_65535, fnname: "div_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: div_65535_uint16, fnname: "div_65535_uint16", in: 1, want: 65535},
+ test_uint16{fn: div_uint16_65535, fnname: "div_uint16_65535", in: 1, want: 0},
+ test_uint16{fn: div_65535_uint16, fnname: "div_65535_uint16", in: 65535, want: 1},
+ test_uint16{fn: div_uint16_65535, fnname: "div_uint16_65535", in: 65535, want: 1},
+ test_uint16{fn: mul_0_uint16, fnname: "mul_0_uint16", in: 0, want: 0},
+ test_uint16{fn: mul_uint16_0, fnname: "mul_uint16_0", in: 0, want: 0},
+ test_uint16{fn: mul_0_uint16, fnname: "mul_0_uint16", in: 1, want: 0},
+ test_uint16{fn: mul_uint16_0, fnname: "mul_uint16_0", in: 1, want: 0},
+ test_uint16{fn: mul_0_uint16, fnname: "mul_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: mul_uint16_0, fnname: "mul_uint16_0", in: 65535, want: 0},
+ test_uint16{fn: mul_1_uint16, fnname: "mul_1_uint16", in: 0, want: 0},
+ test_uint16{fn: mul_uint16_1, fnname: "mul_uint16_1", in: 0, want: 0},
+ test_uint16{fn: mul_1_uint16, fnname: "mul_1_uint16", in: 1, want: 1},
+ test_uint16{fn: mul_uint16_1, fnname: "mul_uint16_1", in: 1, want: 1},
+ test_uint16{fn: mul_1_uint16, fnname: "mul_1_uint16", in: 65535, want: 65535},
+ test_uint16{fn: mul_uint16_1, fnname: "mul_uint16_1", in: 65535, want: 65535},
+ test_uint16{fn: mul_65535_uint16, fnname: "mul_65535_uint16", in: 0, want: 0},
+ test_uint16{fn: mul_uint16_65535, fnname: "mul_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: mul_65535_uint16, fnname: "mul_65535_uint16", in: 1, want: 65535},
+ test_uint16{fn: mul_uint16_65535, fnname: "mul_uint16_65535", in: 1, want: 65535},
+ test_uint16{fn: mul_65535_uint16, fnname: "mul_65535_uint16", in: 65535, want: 1},
+ test_uint16{fn: mul_uint16_65535, fnname: "mul_uint16_65535", in: 65535, want: 1},
+ test_uint16{fn: lsh_0_uint16, fnname: "lsh_0_uint16", in: 0, want: 0},
+ test_uint16{fn: lsh_uint16_0, fnname: "lsh_uint16_0", in: 0, want: 0},
+ test_uint16{fn: lsh_0_uint16, fnname: "lsh_0_uint16", in: 1, want: 0},
+ test_uint16{fn: lsh_uint16_0, fnname: "lsh_uint16_0", in: 1, want: 1},
+ test_uint16{fn: lsh_0_uint16, fnname: "lsh_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: lsh_uint16_0, fnname: "lsh_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: lsh_1_uint16, fnname: "lsh_1_uint16", in: 0, want: 1},
+ test_uint16{fn: lsh_uint16_1, fnname: "lsh_uint16_1", in: 0, want: 0},
+ test_uint16{fn: lsh_1_uint16, fnname: "lsh_1_uint16", in: 1, want: 2},
+ test_uint16{fn: lsh_uint16_1, fnname: "lsh_uint16_1", in: 1, want: 2},
+ test_uint16{fn: lsh_1_uint16, fnname: "lsh_1_uint16", in: 65535, want: 0},
+ test_uint16{fn: lsh_uint16_1, fnname: "lsh_uint16_1", in: 65535, want: 65534},
+ test_uint16{fn: lsh_65535_uint16, fnname: "lsh_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: lsh_uint16_65535, fnname: "lsh_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: lsh_65535_uint16, fnname: "lsh_65535_uint16", in: 1, want: 65534},
+ test_uint16{fn: lsh_uint16_65535, fnname: "lsh_uint16_65535", in: 1, want: 0},
+ test_uint16{fn: lsh_65535_uint16, fnname: "lsh_65535_uint16", in: 65535, want: 0},
+ test_uint16{fn: lsh_uint16_65535, fnname: "lsh_uint16_65535", in: 65535, want: 0},
+ test_uint16{fn: rsh_0_uint16, fnname: "rsh_0_uint16", in: 0, want: 0},
+ test_uint16{fn: rsh_uint16_0, fnname: "rsh_uint16_0", in: 0, want: 0},
+ test_uint16{fn: rsh_0_uint16, fnname: "rsh_0_uint16", in: 1, want: 0},
+ test_uint16{fn: rsh_uint16_0, fnname: "rsh_uint16_0", in: 1, want: 1},
+ test_uint16{fn: rsh_0_uint16, fnname: "rsh_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: rsh_uint16_0, fnname: "rsh_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: rsh_1_uint16, fnname: "rsh_1_uint16", in: 0, want: 1},
+ test_uint16{fn: rsh_uint16_1, fnname: "rsh_uint16_1", in: 0, want: 0},
+ test_uint16{fn: rsh_1_uint16, fnname: "rsh_1_uint16", in: 1, want: 0},
+ test_uint16{fn: rsh_uint16_1, fnname: "rsh_uint16_1", in: 1, want: 0},
+ test_uint16{fn: rsh_1_uint16, fnname: "rsh_1_uint16", in: 65535, want: 0},
+ test_uint16{fn: rsh_uint16_1, fnname: "rsh_uint16_1", in: 65535, want: 32767},
+ test_uint16{fn: rsh_65535_uint16, fnname: "rsh_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: rsh_uint16_65535, fnname: "rsh_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: rsh_65535_uint16, fnname: "rsh_65535_uint16", in: 1, want: 32767},
+ test_uint16{fn: rsh_uint16_65535, fnname: "rsh_uint16_65535", in: 1, want: 0},
+ test_uint16{fn: rsh_65535_uint16, fnname: "rsh_65535_uint16", in: 65535, want: 0},
+ test_uint16{fn: rsh_uint16_65535, fnname: "rsh_uint16_65535", in: 65535, want: 0},
+ test_uint16{fn: mod_0_uint16, fnname: "mod_0_uint16", in: 1, want: 0},
+ test_uint16{fn: mod_0_uint16, fnname: "mod_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: mod_uint16_1, fnname: "mod_uint16_1", in: 0, want: 0},
+ test_uint16{fn: mod_1_uint16, fnname: "mod_1_uint16", in: 1, want: 0},
+ test_uint16{fn: mod_uint16_1, fnname: "mod_uint16_1", in: 1, want: 0},
+ test_uint16{fn: mod_1_uint16, fnname: "mod_1_uint16", in: 65535, want: 1},
+ test_uint16{fn: mod_uint16_1, fnname: "mod_uint16_1", in: 65535, want: 0},
+ test_uint16{fn: mod_uint16_65535, fnname: "mod_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: mod_65535_uint16, fnname: "mod_65535_uint16", in: 1, want: 0},
+ test_uint16{fn: mod_uint16_65535, fnname: "mod_uint16_65535", in: 1, want: 1},
+ test_uint16{fn: mod_65535_uint16, fnname: "mod_65535_uint16", in: 65535, want: 0},
+ test_uint16{fn: mod_uint16_65535, fnname: "mod_uint16_65535", in: 65535, want: 0},
+ test_uint16{fn: and_0_uint16, fnname: "and_0_uint16", in: 0, want: 0},
+ test_uint16{fn: and_uint16_0, fnname: "and_uint16_0", in: 0, want: 0},
+ test_uint16{fn: and_0_uint16, fnname: "and_0_uint16", in: 1, want: 0},
+ test_uint16{fn: and_uint16_0, fnname: "and_uint16_0", in: 1, want: 0},
+ test_uint16{fn: and_0_uint16, fnname: "and_0_uint16", in: 65535, want: 0},
+ test_uint16{fn: and_uint16_0, fnname: "and_uint16_0", in: 65535, want: 0},
+ test_uint16{fn: and_1_uint16, fnname: "and_1_uint16", in: 0, want: 0},
+ test_uint16{fn: and_uint16_1, fnname: "and_uint16_1", in: 0, want: 0},
+ test_uint16{fn: and_1_uint16, fnname: "and_1_uint16", in: 1, want: 1},
+ test_uint16{fn: and_uint16_1, fnname: "and_uint16_1", in: 1, want: 1},
+ test_uint16{fn: and_1_uint16, fnname: "and_1_uint16", in: 65535, want: 1},
+ test_uint16{fn: and_uint16_1, fnname: "and_uint16_1", in: 65535, want: 1},
+ test_uint16{fn: and_65535_uint16, fnname: "and_65535_uint16", in: 0, want: 0},
+ test_uint16{fn: and_uint16_65535, fnname: "and_uint16_65535", in: 0, want: 0},
+ test_uint16{fn: and_65535_uint16, fnname: "and_65535_uint16", in: 1, want: 1},
+ test_uint16{fn: and_uint16_65535, fnname: "and_uint16_65535", in: 1, want: 1},
+ test_uint16{fn: and_65535_uint16, fnname: "and_65535_uint16", in: 65535, want: 65535},
+ test_uint16{fn: and_uint16_65535, fnname: "and_uint16_65535", in: 65535, want: 65535},
+ test_uint16{fn: or_0_uint16, fnname: "or_0_uint16", in: 0, want: 0},
+ test_uint16{fn: or_uint16_0, fnname: "or_uint16_0", in: 0, want: 0},
+ test_uint16{fn: or_0_uint16, fnname: "or_0_uint16", in: 1, want: 1},
+ test_uint16{fn: or_uint16_0, fnname: "or_uint16_0", in: 1, want: 1},
+ test_uint16{fn: or_0_uint16, fnname: "or_0_uint16", in: 65535, want: 65535},
+ test_uint16{fn: or_uint16_0, fnname: "or_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: or_1_uint16, fnname: "or_1_uint16", in: 0, want: 1},
+ test_uint16{fn: or_uint16_1, fnname: "or_uint16_1", in: 0, want: 1},
+ test_uint16{fn: or_1_uint16, fnname: "or_1_uint16", in: 1, want: 1},
+ test_uint16{fn: or_uint16_1, fnname: "or_uint16_1", in: 1, want: 1},
+ test_uint16{fn: or_1_uint16, fnname: "or_1_uint16", in: 65535, want: 65535},
+ test_uint16{fn: or_uint16_1, fnname: "or_uint16_1", in: 65535, want: 65535},
+ test_uint16{fn: or_65535_uint16, fnname: "or_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: or_uint16_65535, fnname: "or_uint16_65535", in: 0, want: 65535},
+ test_uint16{fn: or_65535_uint16, fnname: "or_65535_uint16", in: 1, want: 65535},
+ test_uint16{fn: or_uint16_65535, fnname: "or_uint16_65535", in: 1, want: 65535},
+ test_uint16{fn: or_65535_uint16, fnname: "or_65535_uint16", in: 65535, want: 65535},
+ test_uint16{fn: or_uint16_65535, fnname: "or_uint16_65535", in: 65535, want: 65535},
+ test_uint16{fn: xor_0_uint16, fnname: "xor_0_uint16", in: 0, want: 0},
+ test_uint16{fn: xor_uint16_0, fnname: "xor_uint16_0", in: 0, want: 0},
+ test_uint16{fn: xor_0_uint16, fnname: "xor_0_uint16", in: 1, want: 1},
+ test_uint16{fn: xor_uint16_0, fnname: "xor_uint16_0", in: 1, want: 1},
+ test_uint16{fn: xor_0_uint16, fnname: "xor_0_uint16", in: 65535, want: 65535},
+ test_uint16{fn: xor_uint16_0, fnname: "xor_uint16_0", in: 65535, want: 65535},
+ test_uint16{fn: xor_1_uint16, fnname: "xor_1_uint16", in: 0, want: 1},
+ test_uint16{fn: xor_uint16_1, fnname: "xor_uint16_1", in: 0, want: 1},
+ test_uint16{fn: xor_1_uint16, fnname: "xor_1_uint16", in: 1, want: 0},
+ test_uint16{fn: xor_uint16_1, fnname: "xor_uint16_1", in: 1, want: 0},
+ test_uint16{fn: xor_1_uint16, fnname: "xor_1_uint16", in: 65535, want: 65534},
+ test_uint16{fn: xor_uint16_1, fnname: "xor_uint16_1", in: 65535, want: 65534},
+ test_uint16{fn: xor_65535_uint16, fnname: "xor_65535_uint16", in: 0, want: 65535},
+ test_uint16{fn: xor_uint16_65535, fnname: "xor_uint16_65535", in: 0, want: 65535},
+ test_uint16{fn: xor_65535_uint16, fnname: "xor_65535_uint16", in: 1, want: 65534},
+ test_uint16{fn: xor_uint16_65535, fnname: "xor_uint16_65535", in: 1, want: 65534},
+ test_uint16{fn: xor_65535_uint16, fnname: "xor_65535_uint16", in: 65535, want: 0},
+ test_uint16{fn: xor_uint16_65535, fnname: "xor_uint16_65535", in: 65535, want: 0}}
+
+type test_int16 struct {
+ fn func(int16) int16
+ fnname string
+ in int16
+ want int16
+}
+
+var tests_int16 = []test_int16{
+
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: -32768, want: 0},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: -32768, want: 0},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: -32767, want: 1},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: -32767, want: 1},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: -1, want: 32767},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: -1, want: 32767},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: 0, want: -32768},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: 0, want: -32768},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: 1, want: -32767},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: 1, want: -32767},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: 32766, want: -2},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: 32766, want: -2},
+ test_int16{fn: add_Neg32768_int16, fnname: "add_Neg32768_int16", in: 32767, want: -1},
+ test_int16{fn: add_int16_Neg32768, fnname: "add_int16_Neg32768", in: 32767, want: -1},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: -32768, want: 1},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: -32768, want: 1},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: -32767, want: 2},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: -32767, want: 2},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: -1, want: -32768},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: -1, want: -32768},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: 0, want: -32767},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: 0, want: -32767},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: 1, want: -32766},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: 1, want: -32766},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: 32766, want: -1},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: 32766, want: -1},
+ test_int16{fn: add_Neg32767_int16, fnname: "add_Neg32767_int16", in: 32767, want: 0},
+ test_int16{fn: add_int16_Neg32767, fnname: "add_int16_Neg32767", in: 32767, want: 0},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: -32768, want: 32767},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: -32768, want: 32767},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: -32767, want: -32768},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: -32767, want: -32768},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: -1, want: -2},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: -1, want: -2},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: 0, want: -1},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: 0, want: -1},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: 1, want: 0},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: 1, want: 0},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: 32766, want: 32765},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: 32766, want: 32765},
+ test_int16{fn: add_Neg1_int16, fnname: "add_Neg1_int16", in: 32767, want: 32766},
+ test_int16{fn: add_int16_Neg1, fnname: "add_int16_Neg1", in: 32767, want: 32766},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: -32768, want: -32768},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: -32768, want: -32768},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: -32767, want: -32767},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: -32767, want: -32767},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: -1, want: -1},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: -1, want: -1},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: 0, want: 0},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: 0, want: 0},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: 1, want: 1},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: 1, want: 1},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: 32766, want: 32766},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: 32766, want: 32766},
+ test_int16{fn: add_0_int16, fnname: "add_0_int16", in: 32767, want: 32767},
+ test_int16{fn: add_int16_0, fnname: "add_int16_0", in: 32767, want: 32767},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: -32768, want: -32767},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: -32768, want: -32767},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: -32767, want: -32766},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: -32767, want: -32766},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: -1, want: 0},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: -1, want: 0},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: 0, want: 1},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: 0, want: 1},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: 1, want: 2},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: 1, want: 2},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: 32766, want: 32767},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: 32766, want: 32767},
+ test_int16{fn: add_1_int16, fnname: "add_1_int16", in: 32767, want: -32768},
+ test_int16{fn: add_int16_1, fnname: "add_int16_1", in: 32767, want: -32768},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: -32768, want: -2},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: -32768, want: -2},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: -32767, want: -1},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: -32767, want: -1},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: -1, want: 32765},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: -1, want: 32765},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: 0, want: 32766},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: 0, want: 32766},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: 1, want: 32767},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: 1, want: 32767},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: 32766, want: -4},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: 32766, want: -4},
+ test_int16{fn: add_32766_int16, fnname: "add_32766_int16", in: 32767, want: -3},
+ test_int16{fn: add_int16_32766, fnname: "add_int16_32766", in: 32767, want: -3},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: -32768, want: -1},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: -32768, want: -1},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: -32767, want: 0},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: -32767, want: 0},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: -1, want: 32766},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: -1, want: 32766},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: 0, want: 32767},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: 0, want: 32767},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: 1, want: -32768},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: 1, want: -32768},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: 32766, want: -3},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: 32766, want: -3},
+ test_int16{fn: add_32767_int16, fnname: "add_32767_int16", in: 32767, want: -2},
+ test_int16{fn: add_int16_32767, fnname: "add_int16_32767", in: 32767, want: -2},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: -32768, want: 0},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: -32768, want: 0},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: -32767, want: -1},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: -32767, want: 1},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: -1, want: -32767},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: -1, want: 32767},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: 0, want: -32768},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: 0, want: -32768},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: 1, want: 32767},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: 1, want: -32767},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: 32766, want: 2},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: 32766, want: -2},
+ test_int16{fn: sub_Neg32768_int16, fnname: "sub_Neg32768_int16", in: 32767, want: 1},
+ test_int16{fn: sub_int16_Neg32768, fnname: "sub_int16_Neg32768", in: 32767, want: -1},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: -32768, want: 1},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: -32768, want: -1},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: -32767, want: 0},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: -32767, want: 0},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: -1, want: -32766},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: -1, want: 32766},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: 0, want: -32767},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: 0, want: 32767},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: 1, want: -32768},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: 1, want: -32768},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: 32766, want: 3},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: 32766, want: -3},
+ test_int16{fn: sub_Neg32767_int16, fnname: "sub_Neg32767_int16", in: 32767, want: 2},
+ test_int16{fn: sub_int16_Neg32767, fnname: "sub_int16_Neg32767", in: 32767, want: -2},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: -32768, want: 32767},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: -32768, want: -32767},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: -32767, want: 32766},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: -32767, want: -32766},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: -1, want: 0},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: -1, want: 0},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: 0, want: -1},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: 0, want: 1},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: 1, want: -2},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: 1, want: 2},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: 32766, want: -32767},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: 32766, want: 32767},
+ test_int16{fn: sub_Neg1_int16, fnname: "sub_Neg1_int16", in: 32767, want: -32768},
+ test_int16{fn: sub_int16_Neg1, fnname: "sub_int16_Neg1", in: 32767, want: -32768},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: -32768, want: -32768},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: -32768, want: -32768},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: -32767, want: 32767},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: -32767, want: -32767},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: -1, want: 1},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: -1, want: -1},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: 0, want: 0},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: 0, want: 0},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: 1, want: -1},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: 1, want: 1},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: 32766, want: -32766},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: 32766, want: 32766},
+ test_int16{fn: sub_0_int16, fnname: "sub_0_int16", in: 32767, want: -32767},
+ test_int16{fn: sub_int16_0, fnname: "sub_int16_0", in: 32767, want: 32767},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: -32768, want: -32767},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: -32768, want: 32767},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: -32767, want: -32768},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: -32767, want: -32768},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: -1, want: 2},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: -1, want: -2},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: 0, want: 1},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: 0, want: -1},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: 1, want: 0},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: 1, want: 0},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: 32766, want: -32765},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: 32766, want: 32765},
+ test_int16{fn: sub_1_int16, fnname: "sub_1_int16", in: 32767, want: -32766},
+ test_int16{fn: sub_int16_1, fnname: "sub_int16_1", in: 32767, want: 32766},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: -32768, want: -2},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: -32768, want: 2},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: -32767, want: -3},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: -32767, want: 3},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: -1, want: 32767},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: -1, want: -32767},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: 0, want: 32766},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: 0, want: -32766},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: 1, want: 32765},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: 1, want: -32765},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: 32766, want: 0},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: 32766, want: 0},
+ test_int16{fn: sub_32766_int16, fnname: "sub_32766_int16", in: 32767, want: -1},
+ test_int16{fn: sub_int16_32766, fnname: "sub_int16_32766", in: 32767, want: 1},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: -32768, want: -1},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: -32768, want: 1},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: -32767, want: -2},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: -32767, want: 2},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: -1, want: -32768},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: -1, want: -32768},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: 0, want: 32767},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: 0, want: -32767},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: 1, want: 32766},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: 1, want: -32766},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: 32766, want: 1},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: 32766, want: -1},
+ test_int16{fn: sub_32767_int16, fnname: "sub_32767_int16", in: 32767, want: 0},
+ test_int16{fn: sub_int16_32767, fnname: "sub_int16_32767", in: 32767, want: 0},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: -32768, want: 1},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: -32768, want: 1},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: -32767, want: 1},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: -32767, want: 0},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: -1, want: -32768},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: -1, want: 0},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: 0, want: 0},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: 1, want: -32768},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: 1, want: 0},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: 32766, want: -1},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: 32766, want: 0},
+ test_int16{fn: div_Neg32768_int16, fnname: "div_Neg32768_int16", in: 32767, want: -1},
+ test_int16{fn: div_int16_Neg32768, fnname: "div_int16_Neg32768", in: 32767, want: 0},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: -32768, want: 0},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: -32768, want: 1},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: -32767, want: 1},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: -32767, want: 1},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: -1, want: 32767},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: -1, want: 0},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: 0, want: 0},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: 1, want: -32767},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: 1, want: 0},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: 32766, want: -1},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: 32766, want: 0},
+ test_int16{fn: div_Neg32767_int16, fnname: "div_Neg32767_int16", in: 32767, want: -1},
+ test_int16{fn: div_int16_Neg32767, fnname: "div_int16_Neg32767", in: 32767, want: -1},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: -32768, want: 0},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: -32768, want: -32768},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: -32767, want: 0},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: -32767, want: 32767},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: -1, want: 1},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: -1, want: 1},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: 0, want: 0},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: 1, want: -1},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: 1, want: -1},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: 32766, want: 0},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: 32766, want: -32766},
+ test_int16{fn: div_Neg1_int16, fnname: "div_Neg1_int16", in: 32767, want: 0},
+ test_int16{fn: div_int16_Neg1, fnname: "div_int16_Neg1", in: 32767, want: -32767},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: -32768, want: 0},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: -32767, want: 0},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: -1, want: 0},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: 1, want: 0},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: 32766, want: 0},
+ test_int16{fn: div_0_int16, fnname: "div_0_int16", in: 32767, want: 0},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: -32768, want: 0},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: -32768, want: -32768},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: -32767, want: 0},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: -32767, want: -32767},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: -1, want: -1},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: -1, want: -1},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: 0, want: 0},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: 1, want: 1},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: 1, want: 1},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: 32766, want: 0},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: 32766, want: 32766},
+ test_int16{fn: div_1_int16, fnname: "div_1_int16", in: 32767, want: 0},
+ test_int16{fn: div_int16_1, fnname: "div_int16_1", in: 32767, want: 32767},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: -32768, want: 0},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: -32768, want: -1},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: -32767, want: 0},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: -32767, want: -1},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: -1, want: -32766},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: -1, want: 0},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: 0, want: 0},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: 1, want: 32766},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: 1, want: 0},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: 32766, want: 1},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: 32766, want: 1},
+ test_int16{fn: div_32766_int16, fnname: "div_32766_int16", in: 32767, want: 0},
+ test_int16{fn: div_int16_32766, fnname: "div_int16_32766", in: 32767, want: 1},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: -32768, want: 0},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: -32768, want: -1},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: -32767, want: -1},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: -32767, want: -1},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: -1, want: -32767},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: -1, want: 0},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: 0, want: 0},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: 1, want: 32767},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: 1, want: 0},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: 32766, want: 1},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: 32766, want: 0},
+ test_int16{fn: div_32767_int16, fnname: "div_32767_int16", in: 32767, want: 1},
+ test_int16{fn: div_int16_32767, fnname: "div_int16_32767", in: 32767, want: 1},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: -32768, want: 0},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: -32768, want: 0},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: -32767, want: -32768},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: -32767, want: -32768},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: -1, want: -32768},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: -1, want: -32768},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: 0, want: 0},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: 1, want: -32768},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: 1, want: -32768},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: 32766, want: 0},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: 32766, want: 0},
+ test_int16{fn: mul_Neg32768_int16, fnname: "mul_Neg32768_int16", in: 32767, want: -32768},
+ test_int16{fn: mul_int16_Neg32768, fnname: "mul_int16_Neg32768", in: 32767, want: -32768},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: -32768, want: -32768},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: -32768, want: -32768},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: -32767, want: 1},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: -32767, want: 1},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: -1, want: 32767},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: -1, want: 32767},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: 0, want: 0},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: 1, want: -32767},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: 1, want: -32767},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: 32766, want: 32766},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: 32766, want: 32766},
+ test_int16{fn: mul_Neg32767_int16, fnname: "mul_Neg32767_int16", in: 32767, want: -1},
+ test_int16{fn: mul_int16_Neg32767, fnname: "mul_int16_Neg32767", in: 32767, want: -1},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: -32768, want: -32768},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: -32768, want: -32768},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: -32767, want: 32767},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: -32767, want: 32767},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: -1, want: 1},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: -1, want: 1},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: 0, want: 0},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: 1, want: -1},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: 1, want: -1},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: 32766, want: -32766},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: 32766, want: -32766},
+ test_int16{fn: mul_Neg1_int16, fnname: "mul_Neg1_int16", in: 32767, want: -32767},
+ test_int16{fn: mul_int16_Neg1, fnname: "mul_int16_Neg1", in: 32767, want: -32767},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: -32768, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: -32768, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: -32767, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: -32767, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: -1, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: -1, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: 0, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: 1, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: 1, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: 32766, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: 32766, want: 0},
+ test_int16{fn: mul_0_int16, fnname: "mul_0_int16", in: 32767, want: 0},
+ test_int16{fn: mul_int16_0, fnname: "mul_int16_0", in: 32767, want: 0},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: -32768, want: -32768},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: -32768, want: -32768},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: -32767, want: -32767},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: -32767, want: -32767},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: -1, want: -1},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: -1, want: -1},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: 0, want: 0},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: 1, want: 1},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: 1, want: 1},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: 32766, want: 32766},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: 32766, want: 32766},
+ test_int16{fn: mul_1_int16, fnname: "mul_1_int16", in: 32767, want: 32767},
+ test_int16{fn: mul_int16_1, fnname: "mul_int16_1", in: 32767, want: 32767},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: -32768, want: 0},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: -32768, want: 0},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: -32767, want: 32766},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: -32767, want: 32766},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: -1, want: -32766},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: -1, want: -32766},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: 0, want: 0},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: 1, want: 32766},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: 1, want: 32766},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: 32766, want: 4},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: 32766, want: 4},
+ test_int16{fn: mul_32766_int16, fnname: "mul_32766_int16", in: 32767, want: -32766},
+ test_int16{fn: mul_int16_32766, fnname: "mul_int16_32766", in: 32767, want: -32766},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: -32768, want: -32768},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: -32768, want: -32768},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: -32767, want: -1},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: -32767, want: -1},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: -1, want: -32767},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: -1, want: -32767},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: 0, want: 0},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: 0, want: 0},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: 1, want: 32767},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: 1, want: 32767},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: 32766, want: -32766},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: 32766, want: -32766},
+ test_int16{fn: mul_32767_int16, fnname: "mul_32767_int16", in: 32767, want: 1},
+ test_int16{fn: mul_int16_32767, fnname: "mul_int16_32767", in: 32767, want: 1},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: -32768, want: 0},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: -32768, want: 0},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: -32767, want: -1},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: -32767, want: -32767},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: -1, want: -1},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: 0, want: 0},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: 1, want: 1},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: 32766, want: -2},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: 32766, want: 32766},
+ test_int16{fn: mod_Neg32768_int16, fnname: "mod_Neg32768_int16", in: 32767, want: -1},
+ test_int16{fn: mod_int16_Neg32768, fnname: "mod_int16_Neg32768", in: 32767, want: 32767},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: -32768, want: -32767},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: -32768, want: -1},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: -32767, want: 0},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: -32767, want: 0},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: -1, want: -1},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: 0, want: 0},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: 1, want: 1},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: 32766, want: -1},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: 32766, want: 32766},
+ test_int16{fn: mod_Neg32767_int16, fnname: "mod_Neg32767_int16", in: 32767, want: 0},
+ test_int16{fn: mod_int16_Neg32767, fnname: "mod_int16_Neg32767", in: 32767, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: -32768, want: -1},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: -32768, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: -32767, want: -1},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: -32767, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: -1, want: 0},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: 0, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: 1, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: 32766, want: -1},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: 32766, want: 0},
+ test_int16{fn: mod_Neg1_int16, fnname: "mod_Neg1_int16", in: 32767, want: -1},
+ test_int16{fn: mod_int16_Neg1, fnname: "mod_int16_Neg1", in: 32767, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: -32768, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: -32767, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: -1, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: 1, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: 32766, want: 0},
+ test_int16{fn: mod_0_int16, fnname: "mod_0_int16", in: 32767, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: -32768, want: 1},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: -32768, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: -32767, want: 1},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: -32767, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: -1, want: 0},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: 0, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: 1, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: 32766, want: 1},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: 32766, want: 0},
+ test_int16{fn: mod_1_int16, fnname: "mod_1_int16", in: 32767, want: 1},
+ test_int16{fn: mod_int16_1, fnname: "mod_int16_1", in: 32767, want: 0},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: -32768, want: 32766},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: -32768, want: -2},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: -32767, want: 32766},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: -32767, want: -1},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: -1, want: -1},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: 0, want: 0},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: 1, want: 1},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: 32766, want: 0},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: 32766, want: 0},
+ test_int16{fn: mod_32766_int16, fnname: "mod_32766_int16", in: 32767, want: 32766},
+ test_int16{fn: mod_int16_32766, fnname: "mod_int16_32766", in: 32767, want: 1},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: -32768, want: 32767},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: -32768, want: -1},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: -32767, want: 0},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: -32767, want: 0},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: -1, want: 0},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: -1, want: -1},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: 0, want: 0},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: 1, want: 0},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: 1, want: 1},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: 32766, want: 1},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: 32766, want: 32766},
+ test_int16{fn: mod_32767_int16, fnname: "mod_32767_int16", in: 32767, want: 0},
+ test_int16{fn: mod_int16_32767, fnname: "mod_int16_32767", in: 32767, want: 0},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: -32768, want: -32768},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: -32768, want: -32768},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: -32767, want: -32768},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: -32767, want: -32768},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: -1, want: -32768},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: -1, want: -32768},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: 0, want: 0},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: 1, want: 0},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: 1, want: 0},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: 32766, want: 0},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: 32766, want: 0},
+ test_int16{fn: and_Neg32768_int16, fnname: "and_Neg32768_int16", in: 32767, want: 0},
+ test_int16{fn: and_int16_Neg32768, fnname: "and_int16_Neg32768", in: 32767, want: 0},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: -32768, want: -32768},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: -32768, want: -32768},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: -32767, want: -32767},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: -32767, want: -32767},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: -1, want: -32767},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: -1, want: -32767},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: 0, want: 0},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: 1, want: 1},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: 1, want: 1},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: 32766, want: 0},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: 32766, want: 0},
+ test_int16{fn: and_Neg32767_int16, fnname: "and_Neg32767_int16", in: 32767, want: 1},
+ test_int16{fn: and_int16_Neg32767, fnname: "and_int16_Neg32767", in: 32767, want: 1},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: -32768, want: -32768},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: -32768, want: -32768},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: -32767, want: -32767},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: -32767, want: -32767},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: -1, want: -1},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: -1, want: -1},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: 0, want: 0},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: 1, want: 1},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: 1, want: 1},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: 32766, want: 32766},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: 32766, want: 32766},
+ test_int16{fn: and_Neg1_int16, fnname: "and_Neg1_int16", in: 32767, want: 32767},
+ test_int16{fn: and_int16_Neg1, fnname: "and_int16_Neg1", in: 32767, want: 32767},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: -32768, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: -32768, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: -32767, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: -32767, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: -1, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: -1, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: 0, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: 1, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: 1, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: 32766, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: 32766, want: 0},
+ test_int16{fn: and_0_int16, fnname: "and_0_int16", in: 32767, want: 0},
+ test_int16{fn: and_int16_0, fnname: "and_int16_0", in: 32767, want: 0},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: -32768, want: 0},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: -32768, want: 0},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: -32767, want: 1},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: -32767, want: 1},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: -1, want: 1},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: -1, want: 1},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: 0, want: 0},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: 1, want: 1},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: 1, want: 1},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: 32766, want: 0},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: 32766, want: 0},
+ test_int16{fn: and_1_int16, fnname: "and_1_int16", in: 32767, want: 1},
+ test_int16{fn: and_int16_1, fnname: "and_int16_1", in: 32767, want: 1},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: -32768, want: 0},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: -32768, want: 0},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: -32767, want: 0},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: -32767, want: 0},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: -1, want: 32766},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: -1, want: 32766},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: 0, want: 0},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: 1, want: 0},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: 1, want: 0},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: 32766, want: 32766},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: 32766, want: 32766},
+ test_int16{fn: and_32766_int16, fnname: "and_32766_int16", in: 32767, want: 32766},
+ test_int16{fn: and_int16_32766, fnname: "and_int16_32766", in: 32767, want: 32766},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: -32768, want: 0},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: -32768, want: 0},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: -32767, want: 1},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: -32767, want: 1},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: -1, want: 32767},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: -1, want: 32767},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: 0, want: 0},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: 0, want: 0},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: 1, want: 1},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: 1, want: 1},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: 32766, want: 32766},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: 32766, want: 32766},
+ test_int16{fn: and_32767_int16, fnname: "and_32767_int16", in: 32767, want: 32767},
+ test_int16{fn: and_int16_32767, fnname: "and_int16_32767", in: 32767, want: 32767},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: -32768, want: -32768},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: -32768, want: -32768},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: -32767, want: -32767},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: -32767, want: -32767},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: -1, want: -1},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: 0, want: -32768},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: 0, want: -32768},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: 1, want: -32767},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: 1, want: -32767},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: 32766, want: -2},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: 32766, want: -2},
+ test_int16{fn: or_Neg32768_int16, fnname: "or_Neg32768_int16", in: 32767, want: -1},
+ test_int16{fn: or_int16_Neg32768, fnname: "or_int16_Neg32768", in: 32767, want: -1},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: -32768, want: -32767},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: -32768, want: -32767},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: -32767, want: -32767},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: -32767, want: -32767},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: -1, want: -1},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: 0, want: -32767},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: 0, want: -32767},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: 1, want: -32767},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: 1, want: -32767},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: 32766, want: -1},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: 32766, want: -1},
+ test_int16{fn: or_Neg32767_int16, fnname: "or_Neg32767_int16", in: 32767, want: -1},
+ test_int16{fn: or_int16_Neg32767, fnname: "or_int16_Neg32767", in: 32767, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: -32768, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: -32768, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: -32767, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: -32767, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: -1, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: 0, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: 0, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: 1, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: 1, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: 32766, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: 32766, want: -1},
+ test_int16{fn: or_Neg1_int16, fnname: "or_Neg1_int16", in: 32767, want: -1},
+ test_int16{fn: or_int16_Neg1, fnname: "or_int16_Neg1", in: 32767, want: -1},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: -32768, want: -32768},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: -32768, want: -32768},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: -32767, want: -32767},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: -32767, want: -32767},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: -1, want: -1},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: 0, want: 0},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: 0, want: 0},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: 1, want: 1},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: 1, want: 1},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: 32766, want: 32766},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: 32766, want: 32766},
+ test_int16{fn: or_0_int16, fnname: "or_0_int16", in: 32767, want: 32767},
+ test_int16{fn: or_int16_0, fnname: "or_int16_0", in: 32767, want: 32767},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: -32768, want: -32767},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: -32768, want: -32767},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: -32767, want: -32767},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: -32767, want: -32767},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: -1, want: -1},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: 0, want: 1},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: 0, want: 1},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: 1, want: 1},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: 1, want: 1},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: 32766, want: 32767},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: 32766, want: 32767},
+ test_int16{fn: or_1_int16, fnname: "or_1_int16", in: 32767, want: 32767},
+ test_int16{fn: or_int16_1, fnname: "or_int16_1", in: 32767, want: 32767},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: -32768, want: -2},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: -32768, want: -2},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: -32767, want: -1},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: -32767, want: -1},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: -1, want: -1},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: 0, want: 32766},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: 0, want: 32766},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: 1, want: 32767},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: 1, want: 32767},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: 32766, want: 32766},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: 32766, want: 32766},
+ test_int16{fn: or_32766_int16, fnname: "or_32766_int16", in: 32767, want: 32767},
+ test_int16{fn: or_int16_32766, fnname: "or_int16_32766", in: 32767, want: 32767},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: -32768, want: -1},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: -32768, want: -1},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: -32767, want: -1},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: -32767, want: -1},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: -1, want: -1},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: -1, want: -1},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: 0, want: 32767},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: 0, want: 32767},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: 1, want: 32767},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: 1, want: 32767},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: 32766, want: 32767},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: 32766, want: 32767},
+ test_int16{fn: or_32767_int16, fnname: "or_32767_int16", in: 32767, want: 32767},
+ test_int16{fn: or_int16_32767, fnname: "or_int16_32767", in: 32767, want: 32767},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: -32768, want: 0},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: -32768, want: 0},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: -32767, want: 1},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: -32767, want: 1},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: -1, want: 32767},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: -1, want: 32767},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: 0, want: -32768},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: 0, want: -32768},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: 1, want: -32767},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: 1, want: -32767},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: 32766, want: -2},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: 32766, want: -2},
+ test_int16{fn: xor_Neg32768_int16, fnname: "xor_Neg32768_int16", in: 32767, want: -1},
+ test_int16{fn: xor_int16_Neg32768, fnname: "xor_int16_Neg32768", in: 32767, want: -1},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: -32768, want: 1},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: -32768, want: 1},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: -32767, want: 0},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: -32767, want: 0},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: -1, want: 32766},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: -1, want: 32766},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: 0, want: -32767},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: 0, want: -32767},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: 1, want: -32768},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: 1, want: -32768},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: 32766, want: -1},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: 32766, want: -1},
+ test_int16{fn: xor_Neg32767_int16, fnname: "xor_Neg32767_int16", in: 32767, want: -2},
+ test_int16{fn: xor_int16_Neg32767, fnname: "xor_int16_Neg32767", in: 32767, want: -2},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: -32768, want: 32767},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: -32768, want: 32767},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: -32767, want: 32766},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: -32767, want: 32766},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: -1, want: 0},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: -1, want: 0},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: 0, want: -1},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: 0, want: -1},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: 1, want: -2},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: 1, want: -2},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: 32766, want: -32767},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: 32766, want: -32767},
+ test_int16{fn: xor_Neg1_int16, fnname: "xor_Neg1_int16", in: 32767, want: -32768},
+ test_int16{fn: xor_int16_Neg1, fnname: "xor_int16_Neg1", in: 32767, want: -32768},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: -32768, want: -32768},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: -32768, want: -32768},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: -32767, want: -32767},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: -32767, want: -32767},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: -1, want: -1},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: -1, want: -1},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: 0, want: 0},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: 0, want: 0},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: 1, want: 1},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: 1, want: 1},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: 32766, want: 32766},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: 32766, want: 32766},
+ test_int16{fn: xor_0_int16, fnname: "xor_0_int16", in: 32767, want: 32767},
+ test_int16{fn: xor_int16_0, fnname: "xor_int16_0", in: 32767, want: 32767},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: -32768, want: -32767},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: -32768, want: -32767},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: -32767, want: -32768},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: -32767, want: -32768},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: -1, want: -2},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: -1, want: -2},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: 0, want: 1},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: 0, want: 1},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: 1, want: 0},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: 1, want: 0},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: 32766, want: 32767},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: 32766, want: 32767},
+ test_int16{fn: xor_1_int16, fnname: "xor_1_int16", in: 32767, want: 32766},
+ test_int16{fn: xor_int16_1, fnname: "xor_int16_1", in: 32767, want: 32766},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: -32768, want: -2},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: -32768, want: -2},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: -32767, want: -1},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: -32767, want: -1},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: -1, want: -32767},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: -1, want: -32767},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: 0, want: 32766},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: 0, want: 32766},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: 1, want: 32767},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: 1, want: 32767},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: 32766, want: 0},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: 32766, want: 0},
+ test_int16{fn: xor_32766_int16, fnname: "xor_32766_int16", in: 32767, want: 1},
+ test_int16{fn: xor_int16_32766, fnname: "xor_int16_32766", in: 32767, want: 1},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: -32768, want: -1},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: -32768, want: -1},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: -32767, want: -2},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: -32767, want: -2},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: -1, want: -32768},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: -1, want: -32768},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: 0, want: 32767},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: 0, want: 32767},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: 1, want: 32766},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: 1, want: 32766},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: 32766, want: 1},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: 32766, want: 1},
+ test_int16{fn: xor_32767_int16, fnname: "xor_32767_int16", in: 32767, want: 0},
+ test_int16{fn: xor_int16_32767, fnname: "xor_int16_32767", in: 32767, want: 0}}
+
+type test_uint8 struct {
+ fn func(uint8) uint8
+ fnname string
+ in uint8
+ want uint8
+}
+
+var tests_uint8 = []test_uint8{
+
+ test_uint8{fn: add_0_uint8, fnname: "add_0_uint8", in: 0, want: 0},
+ test_uint8{fn: add_uint8_0, fnname: "add_uint8_0", in: 0, want: 0},
+ test_uint8{fn: add_0_uint8, fnname: "add_0_uint8", in: 1, want: 1},
+ test_uint8{fn: add_uint8_0, fnname: "add_uint8_0", in: 1, want: 1},
+ test_uint8{fn: add_0_uint8, fnname: "add_0_uint8", in: 255, want: 255},
+ test_uint8{fn: add_uint8_0, fnname: "add_uint8_0", in: 255, want: 255},
+ test_uint8{fn: add_1_uint8, fnname: "add_1_uint8", in: 0, want: 1},
+ test_uint8{fn: add_uint8_1, fnname: "add_uint8_1", in: 0, want: 1},
+ test_uint8{fn: add_1_uint8, fnname: "add_1_uint8", in: 1, want: 2},
+ test_uint8{fn: add_uint8_1, fnname: "add_uint8_1", in: 1, want: 2},
+ test_uint8{fn: add_1_uint8, fnname: "add_1_uint8", in: 255, want: 0},
+ test_uint8{fn: add_uint8_1, fnname: "add_uint8_1", in: 255, want: 0},
+ test_uint8{fn: add_255_uint8, fnname: "add_255_uint8", in: 0, want: 255},
+ test_uint8{fn: add_uint8_255, fnname: "add_uint8_255", in: 0, want: 255},
+ test_uint8{fn: add_255_uint8, fnname: "add_255_uint8", in: 1, want: 0},
+ test_uint8{fn: add_uint8_255, fnname: "add_uint8_255", in: 1, want: 0},
+ test_uint8{fn: add_255_uint8, fnname: "add_255_uint8", in: 255, want: 254},
+ test_uint8{fn: add_uint8_255, fnname: "add_uint8_255", in: 255, want: 254},
+ test_uint8{fn: sub_0_uint8, fnname: "sub_0_uint8", in: 0, want: 0},
+ test_uint8{fn: sub_uint8_0, fnname: "sub_uint8_0", in: 0, want: 0},
+ test_uint8{fn: sub_0_uint8, fnname: "sub_0_uint8", in: 1, want: 255},
+ test_uint8{fn: sub_uint8_0, fnname: "sub_uint8_0", in: 1, want: 1},
+ test_uint8{fn: sub_0_uint8, fnname: "sub_0_uint8", in: 255, want: 1},
+ test_uint8{fn: sub_uint8_0, fnname: "sub_uint8_0", in: 255, want: 255},
+ test_uint8{fn: sub_1_uint8, fnname: "sub_1_uint8", in: 0, want: 1},
+ test_uint8{fn: sub_uint8_1, fnname: "sub_uint8_1", in: 0, want: 255},
+ test_uint8{fn: sub_1_uint8, fnname: "sub_1_uint8", in: 1, want: 0},
+ test_uint8{fn: sub_uint8_1, fnname: "sub_uint8_1", in: 1, want: 0},
+ test_uint8{fn: sub_1_uint8, fnname: "sub_1_uint8", in: 255, want: 2},
+ test_uint8{fn: sub_uint8_1, fnname: "sub_uint8_1", in: 255, want: 254},
+ test_uint8{fn: sub_255_uint8, fnname: "sub_255_uint8", in: 0, want: 255},
+ test_uint8{fn: sub_uint8_255, fnname: "sub_uint8_255", in: 0, want: 1},
+ test_uint8{fn: sub_255_uint8, fnname: "sub_255_uint8", in: 1, want: 254},
+ test_uint8{fn: sub_uint8_255, fnname: "sub_uint8_255", in: 1, want: 2},
+ test_uint8{fn: sub_255_uint8, fnname: "sub_255_uint8", in: 255, want: 0},
+ test_uint8{fn: sub_uint8_255, fnname: "sub_uint8_255", in: 255, want: 0},
+ test_uint8{fn: div_0_uint8, fnname: "div_0_uint8", in: 1, want: 0},
+ test_uint8{fn: div_0_uint8, fnname: "div_0_uint8", in: 255, want: 0},
+ test_uint8{fn: div_uint8_1, fnname: "div_uint8_1", in: 0, want: 0},
+ test_uint8{fn: div_1_uint8, fnname: "div_1_uint8", in: 1, want: 1},
+ test_uint8{fn: div_uint8_1, fnname: "div_uint8_1", in: 1, want: 1},
+ test_uint8{fn: div_1_uint8, fnname: "div_1_uint8", in: 255, want: 0},
+ test_uint8{fn: div_uint8_1, fnname: "div_uint8_1", in: 255, want: 255},
+ test_uint8{fn: div_uint8_255, fnname: "div_uint8_255", in: 0, want: 0},
+ test_uint8{fn: div_255_uint8, fnname: "div_255_uint8", in: 1, want: 255},
+ test_uint8{fn: div_uint8_255, fnname: "div_uint8_255", in: 1, want: 0},
+ test_uint8{fn: div_255_uint8, fnname: "div_255_uint8", in: 255, want: 1},
+ test_uint8{fn: div_uint8_255, fnname: "div_uint8_255", in: 255, want: 1},
+ test_uint8{fn: mul_0_uint8, fnname: "mul_0_uint8", in: 0, want: 0},
+ test_uint8{fn: mul_uint8_0, fnname: "mul_uint8_0", in: 0, want: 0},
+ test_uint8{fn: mul_0_uint8, fnname: "mul_0_uint8", in: 1, want: 0},
+ test_uint8{fn: mul_uint8_0, fnname: "mul_uint8_0", in: 1, want: 0},
+ test_uint8{fn: mul_0_uint8, fnname: "mul_0_uint8", in: 255, want: 0},
+ test_uint8{fn: mul_uint8_0, fnname: "mul_uint8_0", in: 255, want: 0},
+ test_uint8{fn: mul_1_uint8, fnname: "mul_1_uint8", in: 0, want: 0},
+ test_uint8{fn: mul_uint8_1, fnname: "mul_uint8_1", in: 0, want: 0},
+ test_uint8{fn: mul_1_uint8, fnname: "mul_1_uint8", in: 1, want: 1},
+ test_uint8{fn: mul_uint8_1, fnname: "mul_uint8_1", in: 1, want: 1},
+ test_uint8{fn: mul_1_uint8, fnname: "mul_1_uint8", in: 255, want: 255},
+ test_uint8{fn: mul_uint8_1, fnname: "mul_uint8_1", in: 255, want: 255},
+ test_uint8{fn: mul_255_uint8, fnname: "mul_255_uint8", in: 0, want: 0},
+ test_uint8{fn: mul_uint8_255, fnname: "mul_uint8_255", in: 0, want: 0},
+ test_uint8{fn: mul_255_uint8, fnname: "mul_255_uint8", in: 1, want: 255},
+ test_uint8{fn: mul_uint8_255, fnname: "mul_uint8_255", in: 1, want: 255},
+ test_uint8{fn: mul_255_uint8, fnname: "mul_255_uint8", in: 255, want: 1},
+ test_uint8{fn: mul_uint8_255, fnname: "mul_uint8_255", in: 255, want: 1},
+ test_uint8{fn: lsh_0_uint8, fnname: "lsh_0_uint8", in: 0, want: 0},
+ test_uint8{fn: lsh_uint8_0, fnname: "lsh_uint8_0", in: 0, want: 0},
+ test_uint8{fn: lsh_0_uint8, fnname: "lsh_0_uint8", in: 1, want: 0},
+ test_uint8{fn: lsh_uint8_0, fnname: "lsh_uint8_0", in: 1, want: 1},
+ test_uint8{fn: lsh_0_uint8, fnname: "lsh_0_uint8", in: 255, want: 0},
+ test_uint8{fn: lsh_uint8_0, fnname: "lsh_uint8_0", in: 255, want: 255},
+ test_uint8{fn: lsh_1_uint8, fnname: "lsh_1_uint8", in: 0, want: 1},
+ test_uint8{fn: lsh_uint8_1, fnname: "lsh_uint8_1", in: 0, want: 0},
+ test_uint8{fn: lsh_1_uint8, fnname: "lsh_1_uint8", in: 1, want: 2},
+ test_uint8{fn: lsh_uint8_1, fnname: "lsh_uint8_1", in: 1, want: 2},
+ test_uint8{fn: lsh_1_uint8, fnname: "lsh_1_uint8", in: 255, want: 0},
+ test_uint8{fn: lsh_uint8_1, fnname: "lsh_uint8_1", in: 255, want: 254},
+ test_uint8{fn: lsh_255_uint8, fnname: "lsh_255_uint8", in: 0, want: 255},
+ test_uint8{fn: lsh_uint8_255, fnname: "lsh_uint8_255", in: 0, want: 0},
+ test_uint8{fn: lsh_255_uint8, fnname: "lsh_255_uint8", in: 1, want: 254},
+ test_uint8{fn: lsh_uint8_255, fnname: "lsh_uint8_255", in: 1, want: 0},
+ test_uint8{fn: lsh_255_uint8, fnname: "lsh_255_uint8", in: 255, want: 0},
+ test_uint8{fn: lsh_uint8_255, fnname: "lsh_uint8_255", in: 255, want: 0},
+ test_uint8{fn: rsh_0_uint8, fnname: "rsh_0_uint8", in: 0, want: 0},
+ test_uint8{fn: rsh_uint8_0, fnname: "rsh_uint8_0", in: 0, want: 0},
+ test_uint8{fn: rsh_0_uint8, fnname: "rsh_0_uint8", in: 1, want: 0},
+ test_uint8{fn: rsh_uint8_0, fnname: "rsh_uint8_0", in: 1, want: 1},
+ test_uint8{fn: rsh_0_uint8, fnname: "rsh_0_uint8", in: 255, want: 0},
+ test_uint8{fn: rsh_uint8_0, fnname: "rsh_uint8_0", in: 255, want: 255},
+ test_uint8{fn: rsh_1_uint8, fnname: "rsh_1_uint8", in: 0, want: 1},
+ test_uint8{fn: rsh_uint8_1, fnname: "rsh_uint8_1", in: 0, want: 0},
+ test_uint8{fn: rsh_1_uint8, fnname: "rsh_1_uint8", in: 1, want: 0},
+ test_uint8{fn: rsh_uint8_1, fnname: "rsh_uint8_1", in: 1, want: 0},
+ test_uint8{fn: rsh_1_uint8, fnname: "rsh_1_uint8", in: 255, want: 0},
+ test_uint8{fn: rsh_uint8_1, fnname: "rsh_uint8_1", in: 255, want: 127},
+ test_uint8{fn: rsh_255_uint8, fnname: "rsh_255_uint8", in: 0, want: 255},
+ test_uint8{fn: rsh_uint8_255, fnname: "rsh_uint8_255", in: 0, want: 0},
+ test_uint8{fn: rsh_255_uint8, fnname: "rsh_255_uint8", in: 1, want: 127},
+ test_uint8{fn: rsh_uint8_255, fnname: "rsh_uint8_255", in: 1, want: 0},
+ test_uint8{fn: rsh_255_uint8, fnname: "rsh_255_uint8", in: 255, want: 0},
+ test_uint8{fn: rsh_uint8_255, fnname: "rsh_uint8_255", in: 255, want: 0},
+ test_uint8{fn: mod_0_uint8, fnname: "mod_0_uint8", in: 1, want: 0},
+ test_uint8{fn: mod_0_uint8, fnname: "mod_0_uint8", in: 255, want: 0},
+ test_uint8{fn: mod_uint8_1, fnname: "mod_uint8_1", in: 0, want: 0},
+ test_uint8{fn: mod_1_uint8, fnname: "mod_1_uint8", in: 1, want: 0},
+ test_uint8{fn: mod_uint8_1, fnname: "mod_uint8_1", in: 1, want: 0},
+ test_uint8{fn: mod_1_uint8, fnname: "mod_1_uint8", in: 255, want: 1},
+ test_uint8{fn: mod_uint8_1, fnname: "mod_uint8_1", in: 255, want: 0},
+ test_uint8{fn: mod_uint8_255, fnname: "mod_uint8_255", in: 0, want: 0},
+ test_uint8{fn: mod_255_uint8, fnname: "mod_255_uint8", in: 1, want: 0},
+ test_uint8{fn: mod_uint8_255, fnname: "mod_uint8_255", in: 1, want: 1},
+ test_uint8{fn: mod_255_uint8, fnname: "mod_255_uint8", in: 255, want: 0},
+ test_uint8{fn: mod_uint8_255, fnname: "mod_uint8_255", in: 255, want: 0},
+ test_uint8{fn: and_0_uint8, fnname: "and_0_uint8", in: 0, want: 0},
+ test_uint8{fn: and_uint8_0, fnname: "and_uint8_0", in: 0, want: 0},
+ test_uint8{fn: and_0_uint8, fnname: "and_0_uint8", in: 1, want: 0},
+ test_uint8{fn: and_uint8_0, fnname: "and_uint8_0", in: 1, want: 0},
+ test_uint8{fn: and_0_uint8, fnname: "and_0_uint8", in: 255, want: 0},
+ test_uint8{fn: and_uint8_0, fnname: "and_uint8_0", in: 255, want: 0},
+ test_uint8{fn: and_1_uint8, fnname: "and_1_uint8", in: 0, want: 0},
+ test_uint8{fn: and_uint8_1, fnname: "and_uint8_1", in: 0, want: 0},
+ test_uint8{fn: and_1_uint8, fnname: "and_1_uint8", in: 1, want: 1},
+ test_uint8{fn: and_uint8_1, fnname: "and_uint8_1", in: 1, want: 1},
+ test_uint8{fn: and_1_uint8, fnname: "and_1_uint8", in: 255, want: 1},
+ test_uint8{fn: and_uint8_1, fnname: "and_uint8_1", in: 255, want: 1},
+ test_uint8{fn: and_255_uint8, fnname: "and_255_uint8", in: 0, want: 0},
+ test_uint8{fn: and_uint8_255, fnname: "and_uint8_255", in: 0, want: 0},
+ test_uint8{fn: and_255_uint8, fnname: "and_255_uint8", in: 1, want: 1},
+ test_uint8{fn: and_uint8_255, fnname: "and_uint8_255", in: 1, want: 1},
+ test_uint8{fn: and_255_uint8, fnname: "and_255_uint8", in: 255, want: 255},
+ test_uint8{fn: and_uint8_255, fnname: "and_uint8_255", in: 255, want: 255},
+ test_uint8{fn: or_0_uint8, fnname: "or_0_uint8", in: 0, want: 0},
+ test_uint8{fn: or_uint8_0, fnname: "or_uint8_0", in: 0, want: 0},
+ test_uint8{fn: or_0_uint8, fnname: "or_0_uint8", in: 1, want: 1},
+ test_uint8{fn: or_uint8_0, fnname: "or_uint8_0", in: 1, want: 1},
+ test_uint8{fn: or_0_uint8, fnname: "or_0_uint8", in: 255, want: 255},
+ test_uint8{fn: or_uint8_0, fnname: "or_uint8_0", in: 255, want: 255},
+ test_uint8{fn: or_1_uint8, fnname: "or_1_uint8", in: 0, want: 1},
+ test_uint8{fn: or_uint8_1, fnname: "or_uint8_1", in: 0, want: 1},
+ test_uint8{fn: or_1_uint8, fnname: "or_1_uint8", in: 1, want: 1},
+ test_uint8{fn: or_uint8_1, fnname: "or_uint8_1", in: 1, want: 1},
+ test_uint8{fn: or_1_uint8, fnname: "or_1_uint8", in: 255, want: 255},
+ test_uint8{fn: or_uint8_1, fnname: "or_uint8_1", in: 255, want: 255},
+ test_uint8{fn: or_255_uint8, fnname: "or_255_uint8", in: 0, want: 255},
+ test_uint8{fn: or_uint8_255, fnname: "or_uint8_255", in: 0, want: 255},
+ test_uint8{fn: or_255_uint8, fnname: "or_255_uint8", in: 1, want: 255},
+ test_uint8{fn: or_uint8_255, fnname: "or_uint8_255", in: 1, want: 255},
+ test_uint8{fn: or_255_uint8, fnname: "or_255_uint8", in: 255, want: 255},
+ test_uint8{fn: or_uint8_255, fnname: "or_uint8_255", in: 255, want: 255},
+ test_uint8{fn: xor_0_uint8, fnname: "xor_0_uint8", in: 0, want: 0},
+ test_uint8{fn: xor_uint8_0, fnname: "xor_uint8_0", in: 0, want: 0},
+ test_uint8{fn: xor_0_uint8, fnname: "xor_0_uint8", in: 1, want: 1},
+ test_uint8{fn: xor_uint8_0, fnname: "xor_uint8_0", in: 1, want: 1},
+ test_uint8{fn: xor_0_uint8, fnname: "xor_0_uint8", in: 255, want: 255},
+ test_uint8{fn: xor_uint8_0, fnname: "xor_uint8_0", in: 255, want: 255},
+ test_uint8{fn: xor_1_uint8, fnname: "xor_1_uint8", in: 0, want: 1},
+ test_uint8{fn: xor_uint8_1, fnname: "xor_uint8_1", in: 0, want: 1},
+ test_uint8{fn: xor_1_uint8, fnname: "xor_1_uint8", in: 1, want: 0},
+ test_uint8{fn: xor_uint8_1, fnname: "xor_uint8_1", in: 1, want: 0},
+ test_uint8{fn: xor_1_uint8, fnname: "xor_1_uint8", in: 255, want: 254},
+ test_uint8{fn: xor_uint8_1, fnname: "xor_uint8_1", in: 255, want: 254},
+ test_uint8{fn: xor_255_uint8, fnname: "xor_255_uint8", in: 0, want: 255},
+ test_uint8{fn: xor_uint8_255, fnname: "xor_uint8_255", in: 0, want: 255},
+ test_uint8{fn: xor_255_uint8, fnname: "xor_255_uint8", in: 1, want: 254},
+ test_uint8{fn: xor_uint8_255, fnname: "xor_uint8_255", in: 1, want: 254},
+ test_uint8{fn: xor_255_uint8, fnname: "xor_255_uint8", in: 255, want: 0},
+ test_uint8{fn: xor_uint8_255, fnname: "xor_uint8_255", in: 255, want: 0}}
+
+type test_int8 struct {
+ fn func(int8) int8
+ fnname string
+ in int8
+ want int8
+}
+
+var tests_int8 = []test_int8{
+
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: -128, want: 0},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: -128, want: 0},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: -127, want: 1},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: -127, want: 1},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: -1, want: 127},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: -1, want: 127},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: 0, want: -128},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: 0, want: -128},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: 1, want: -127},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: 1, want: -127},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: 126, want: -2},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: 126, want: -2},
+ test_int8{fn: add_Neg128_int8, fnname: "add_Neg128_int8", in: 127, want: -1},
+ test_int8{fn: add_int8_Neg128, fnname: "add_int8_Neg128", in: 127, want: -1},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: -128, want: 1},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: -128, want: 1},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: -127, want: 2},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: -127, want: 2},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: -1, want: -128},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: -1, want: -128},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: 0, want: -127},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: 0, want: -127},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: 1, want: -126},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: 1, want: -126},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: 126, want: -1},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: 126, want: -1},
+ test_int8{fn: add_Neg127_int8, fnname: "add_Neg127_int8", in: 127, want: 0},
+ test_int8{fn: add_int8_Neg127, fnname: "add_int8_Neg127", in: 127, want: 0},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: -128, want: 127},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: -128, want: 127},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: -127, want: -128},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: -127, want: -128},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: -1, want: -2},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: -1, want: -2},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: 0, want: -1},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: 0, want: -1},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: 1, want: 0},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: 1, want: 0},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: 126, want: 125},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: 126, want: 125},
+ test_int8{fn: add_Neg1_int8, fnname: "add_Neg1_int8", in: 127, want: 126},
+ test_int8{fn: add_int8_Neg1, fnname: "add_int8_Neg1", in: 127, want: 126},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: -128, want: -128},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: -128, want: -128},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: -127, want: -127},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: -127, want: -127},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: -1, want: -1},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: -1, want: -1},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: 0, want: 0},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: 0, want: 0},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: 1, want: 1},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: 1, want: 1},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: 126, want: 126},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: 126, want: 126},
+ test_int8{fn: add_0_int8, fnname: "add_0_int8", in: 127, want: 127},
+ test_int8{fn: add_int8_0, fnname: "add_int8_0", in: 127, want: 127},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: -128, want: -127},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: -128, want: -127},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: -127, want: -126},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: -127, want: -126},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: -1, want: 0},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: -1, want: 0},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: 0, want: 1},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: 0, want: 1},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: 1, want: 2},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: 1, want: 2},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: 126, want: 127},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: 126, want: 127},
+ test_int8{fn: add_1_int8, fnname: "add_1_int8", in: 127, want: -128},
+ test_int8{fn: add_int8_1, fnname: "add_int8_1", in: 127, want: -128},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: -128, want: -2},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: -128, want: -2},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: -127, want: -1},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: -127, want: -1},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: -1, want: 125},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: -1, want: 125},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: 0, want: 126},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: 0, want: 126},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: 1, want: 127},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: 1, want: 127},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: 126, want: -4},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: 126, want: -4},
+ test_int8{fn: add_126_int8, fnname: "add_126_int8", in: 127, want: -3},
+ test_int8{fn: add_int8_126, fnname: "add_int8_126", in: 127, want: -3},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: -128, want: -1},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: -128, want: -1},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: -127, want: 0},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: -127, want: 0},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: -1, want: 126},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: -1, want: 126},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: 0, want: 127},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: 0, want: 127},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: 1, want: -128},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: 1, want: -128},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: 126, want: -3},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: 126, want: -3},
+ test_int8{fn: add_127_int8, fnname: "add_127_int8", in: 127, want: -2},
+ test_int8{fn: add_int8_127, fnname: "add_int8_127", in: 127, want: -2},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: -128, want: 0},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: -128, want: 0},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: -127, want: -1},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: -127, want: 1},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: -1, want: -127},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: -1, want: 127},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: 0, want: -128},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: 0, want: -128},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: 1, want: 127},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: 1, want: -127},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: 126, want: 2},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: 126, want: -2},
+ test_int8{fn: sub_Neg128_int8, fnname: "sub_Neg128_int8", in: 127, want: 1},
+ test_int8{fn: sub_int8_Neg128, fnname: "sub_int8_Neg128", in: 127, want: -1},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: -128, want: 1},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: -128, want: -1},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: -127, want: 0},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: -127, want: 0},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: -1, want: -126},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: -1, want: 126},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: 0, want: -127},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: 0, want: 127},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: 1, want: -128},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: 1, want: -128},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: 126, want: 3},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: 126, want: -3},
+ test_int8{fn: sub_Neg127_int8, fnname: "sub_Neg127_int8", in: 127, want: 2},
+ test_int8{fn: sub_int8_Neg127, fnname: "sub_int8_Neg127", in: 127, want: -2},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: -128, want: 127},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: -128, want: -127},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: -127, want: 126},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: -127, want: -126},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: -1, want: 0},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: -1, want: 0},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: 0, want: -1},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: 0, want: 1},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: 1, want: -2},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: 1, want: 2},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: 126, want: -127},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: 126, want: 127},
+ test_int8{fn: sub_Neg1_int8, fnname: "sub_Neg1_int8", in: 127, want: -128},
+ test_int8{fn: sub_int8_Neg1, fnname: "sub_int8_Neg1", in: 127, want: -128},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: -128, want: -128},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: -128, want: -128},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: -127, want: 127},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: -127, want: -127},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: -1, want: 1},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: -1, want: -1},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: 0, want: 0},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: 0, want: 0},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: 1, want: -1},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: 1, want: 1},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: 126, want: -126},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: 126, want: 126},
+ test_int8{fn: sub_0_int8, fnname: "sub_0_int8", in: 127, want: -127},
+ test_int8{fn: sub_int8_0, fnname: "sub_int8_0", in: 127, want: 127},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: -128, want: -127},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: -128, want: 127},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: -127, want: -128},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: -127, want: -128},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: -1, want: 2},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: -1, want: -2},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: 0, want: 1},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: 0, want: -1},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: 1, want: 0},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: 1, want: 0},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: 126, want: -125},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: 126, want: 125},
+ test_int8{fn: sub_1_int8, fnname: "sub_1_int8", in: 127, want: -126},
+ test_int8{fn: sub_int8_1, fnname: "sub_int8_1", in: 127, want: 126},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: -128, want: -2},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: -128, want: 2},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: -127, want: -3},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: -127, want: 3},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: -1, want: 127},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: -1, want: -127},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: 0, want: 126},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: 0, want: -126},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: 1, want: 125},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: 1, want: -125},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: 126, want: 0},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: 126, want: 0},
+ test_int8{fn: sub_126_int8, fnname: "sub_126_int8", in: 127, want: -1},
+ test_int8{fn: sub_int8_126, fnname: "sub_int8_126", in: 127, want: 1},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: -128, want: -1},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: -128, want: 1},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: -127, want: -2},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: -127, want: 2},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: -1, want: -128},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: -1, want: -128},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: 0, want: 127},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: 0, want: -127},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: 1, want: 126},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: 1, want: -126},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: 126, want: 1},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: 126, want: -1},
+ test_int8{fn: sub_127_int8, fnname: "sub_127_int8", in: 127, want: 0},
+ test_int8{fn: sub_int8_127, fnname: "sub_int8_127", in: 127, want: 0},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: -128, want: 1},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: -128, want: 1},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: -127, want: 1},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: -127, want: 0},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: -1, want: -128},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: -1, want: 0},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: 0, want: 0},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: 1, want: -128},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: 1, want: 0},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: 126, want: -1},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: 126, want: 0},
+ test_int8{fn: div_Neg128_int8, fnname: "div_Neg128_int8", in: 127, want: -1},
+ test_int8{fn: div_int8_Neg128, fnname: "div_int8_Neg128", in: 127, want: 0},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: -128, want: 0},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: -128, want: 1},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: -127, want: 1},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: -127, want: 1},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: -1, want: 127},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: -1, want: 0},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: 0, want: 0},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: 1, want: -127},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: 1, want: 0},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: 126, want: -1},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: 126, want: 0},
+ test_int8{fn: div_Neg127_int8, fnname: "div_Neg127_int8", in: 127, want: -1},
+ test_int8{fn: div_int8_Neg127, fnname: "div_int8_Neg127", in: 127, want: -1},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: -128, want: 0},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: -128, want: -128},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: -127, want: 0},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: -127, want: 127},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: -1, want: 1},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: -1, want: 1},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: 0, want: 0},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: 1, want: -1},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: 1, want: -1},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: 126, want: 0},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: 126, want: -126},
+ test_int8{fn: div_Neg1_int8, fnname: "div_Neg1_int8", in: 127, want: 0},
+ test_int8{fn: div_int8_Neg1, fnname: "div_int8_Neg1", in: 127, want: -127},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: -128, want: 0},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: -127, want: 0},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: -1, want: 0},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: 1, want: 0},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: 126, want: 0},
+ test_int8{fn: div_0_int8, fnname: "div_0_int8", in: 127, want: 0},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: -128, want: 0},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: -128, want: -128},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: -127, want: 0},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: -127, want: -127},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: -1, want: -1},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: -1, want: -1},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: 0, want: 0},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: 1, want: 1},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: 1, want: 1},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: 126, want: 0},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: 126, want: 126},
+ test_int8{fn: div_1_int8, fnname: "div_1_int8", in: 127, want: 0},
+ test_int8{fn: div_int8_1, fnname: "div_int8_1", in: 127, want: 127},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: -128, want: 0},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: -128, want: -1},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: -127, want: 0},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: -127, want: -1},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: -1, want: -126},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: -1, want: 0},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: 0, want: 0},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: 1, want: 126},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: 1, want: 0},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: 126, want: 1},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: 126, want: 1},
+ test_int8{fn: div_126_int8, fnname: "div_126_int8", in: 127, want: 0},
+ test_int8{fn: div_int8_126, fnname: "div_int8_126", in: 127, want: 1},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: -128, want: 0},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: -128, want: -1},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: -127, want: -1},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: -127, want: -1},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: -1, want: -127},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: -1, want: 0},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: 0, want: 0},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: 1, want: 127},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: 1, want: 0},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: 126, want: 1},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: 126, want: 0},
+ test_int8{fn: div_127_int8, fnname: "div_127_int8", in: 127, want: 1},
+ test_int8{fn: div_int8_127, fnname: "div_int8_127", in: 127, want: 1},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: -128, want: 0},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: -128, want: 0},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: -127, want: -128},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: -127, want: -128},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: -1, want: -128},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: -1, want: -128},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: 0, want: 0},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: 1, want: -128},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: 1, want: -128},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: 126, want: 0},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: 126, want: 0},
+ test_int8{fn: mul_Neg128_int8, fnname: "mul_Neg128_int8", in: 127, want: -128},
+ test_int8{fn: mul_int8_Neg128, fnname: "mul_int8_Neg128", in: 127, want: -128},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: -128, want: -128},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: -128, want: -128},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: -127, want: 1},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: -127, want: 1},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: -1, want: 127},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: -1, want: 127},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: 0, want: 0},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: 1, want: -127},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: 1, want: -127},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: 126, want: 126},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: 126, want: 126},
+ test_int8{fn: mul_Neg127_int8, fnname: "mul_Neg127_int8", in: 127, want: -1},
+ test_int8{fn: mul_int8_Neg127, fnname: "mul_int8_Neg127", in: 127, want: -1},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: -128, want: -128},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: -128, want: -128},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: -127, want: 127},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: -127, want: 127},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: -1, want: 1},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: -1, want: 1},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: 0, want: 0},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: 1, want: -1},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: 1, want: -1},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: 126, want: -126},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: 126, want: -126},
+ test_int8{fn: mul_Neg1_int8, fnname: "mul_Neg1_int8", in: 127, want: -127},
+ test_int8{fn: mul_int8_Neg1, fnname: "mul_int8_Neg1", in: 127, want: -127},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: -128, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: -128, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: -127, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: -127, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: -1, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: -1, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: 0, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: 1, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: 1, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: 126, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: 126, want: 0},
+ test_int8{fn: mul_0_int8, fnname: "mul_0_int8", in: 127, want: 0},
+ test_int8{fn: mul_int8_0, fnname: "mul_int8_0", in: 127, want: 0},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: -128, want: -128},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: -128, want: -128},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: -127, want: -127},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: -127, want: -127},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: -1, want: -1},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: -1, want: -1},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: 0, want: 0},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: 1, want: 1},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: 1, want: 1},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: 126, want: 126},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: 126, want: 126},
+ test_int8{fn: mul_1_int8, fnname: "mul_1_int8", in: 127, want: 127},
+ test_int8{fn: mul_int8_1, fnname: "mul_int8_1", in: 127, want: 127},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: -128, want: 0},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: -128, want: 0},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: -127, want: 126},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: -127, want: 126},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: -1, want: -126},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: -1, want: -126},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: 0, want: 0},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: 1, want: 126},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: 1, want: 126},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: 126, want: 4},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: 126, want: 4},
+ test_int8{fn: mul_126_int8, fnname: "mul_126_int8", in: 127, want: -126},
+ test_int8{fn: mul_int8_126, fnname: "mul_int8_126", in: 127, want: -126},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: -128, want: -128},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: -128, want: -128},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: -127, want: -1},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: -127, want: -1},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: -1, want: -127},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: -1, want: -127},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: 0, want: 0},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: 0, want: 0},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: 1, want: 127},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: 1, want: 127},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: 126, want: -126},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: 126, want: -126},
+ test_int8{fn: mul_127_int8, fnname: "mul_127_int8", in: 127, want: 1},
+ test_int8{fn: mul_int8_127, fnname: "mul_int8_127", in: 127, want: 1},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: -128, want: 0},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: -128, want: 0},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: -127, want: -1},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: -127, want: -127},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: -1, want: -1},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: 0, want: 0},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: 1, want: 1},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: 126, want: -2},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: 126, want: 126},
+ test_int8{fn: mod_Neg128_int8, fnname: "mod_Neg128_int8", in: 127, want: -1},
+ test_int8{fn: mod_int8_Neg128, fnname: "mod_int8_Neg128", in: 127, want: 127},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: -128, want: -127},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: -128, want: -1},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: -127, want: 0},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: -127, want: 0},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: -1, want: -1},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: 0, want: 0},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: 1, want: 1},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: 126, want: -1},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: 126, want: 126},
+ test_int8{fn: mod_Neg127_int8, fnname: "mod_Neg127_int8", in: 127, want: 0},
+ test_int8{fn: mod_int8_Neg127, fnname: "mod_int8_Neg127", in: 127, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: -128, want: -1},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: -128, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: -127, want: -1},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: -127, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: -1, want: 0},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: 0, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: 1, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: 126, want: -1},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: 126, want: 0},
+ test_int8{fn: mod_Neg1_int8, fnname: "mod_Neg1_int8", in: 127, want: -1},
+ test_int8{fn: mod_int8_Neg1, fnname: "mod_int8_Neg1", in: 127, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: -128, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: -127, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: -1, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: 1, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: 126, want: 0},
+ test_int8{fn: mod_0_int8, fnname: "mod_0_int8", in: 127, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: -128, want: 1},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: -128, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: -127, want: 1},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: -127, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: -1, want: 0},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: 0, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: 1, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: 126, want: 1},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: 126, want: 0},
+ test_int8{fn: mod_1_int8, fnname: "mod_1_int8", in: 127, want: 1},
+ test_int8{fn: mod_int8_1, fnname: "mod_int8_1", in: 127, want: 0},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: -128, want: 126},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: -128, want: -2},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: -127, want: 126},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: -127, want: -1},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: -1, want: -1},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: 0, want: 0},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: 1, want: 1},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: 126, want: 0},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: 126, want: 0},
+ test_int8{fn: mod_126_int8, fnname: "mod_126_int8", in: 127, want: 126},
+ test_int8{fn: mod_int8_126, fnname: "mod_int8_126", in: 127, want: 1},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: -128, want: 127},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: -128, want: -1},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: -127, want: 0},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: -127, want: 0},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: -1, want: 0},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: -1, want: -1},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: 0, want: 0},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: 1, want: 0},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: 1, want: 1},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: 126, want: 1},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: 126, want: 126},
+ test_int8{fn: mod_127_int8, fnname: "mod_127_int8", in: 127, want: 0},
+ test_int8{fn: mod_int8_127, fnname: "mod_int8_127", in: 127, want: 0},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: -128, want: -128},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: -128, want: -128},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: -127, want: -128},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: -127, want: -128},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: -1, want: -128},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: -1, want: -128},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: 0, want: 0},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: 1, want: 0},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: 1, want: 0},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: 126, want: 0},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: 126, want: 0},
+ test_int8{fn: and_Neg128_int8, fnname: "and_Neg128_int8", in: 127, want: 0},
+ test_int8{fn: and_int8_Neg128, fnname: "and_int8_Neg128", in: 127, want: 0},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: -128, want: -128},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: -128, want: -128},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: -127, want: -127},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: -127, want: -127},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: -1, want: -127},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: -1, want: -127},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: 0, want: 0},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: 1, want: 1},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: 1, want: 1},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: 126, want: 0},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: 126, want: 0},
+ test_int8{fn: and_Neg127_int8, fnname: "and_Neg127_int8", in: 127, want: 1},
+ test_int8{fn: and_int8_Neg127, fnname: "and_int8_Neg127", in: 127, want: 1},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: -128, want: -128},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: -128, want: -128},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: -127, want: -127},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: -127, want: -127},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: -1, want: -1},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: -1, want: -1},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: 0, want: 0},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: 1, want: 1},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: 1, want: 1},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: 126, want: 126},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: 126, want: 126},
+ test_int8{fn: and_Neg1_int8, fnname: "and_Neg1_int8", in: 127, want: 127},
+ test_int8{fn: and_int8_Neg1, fnname: "and_int8_Neg1", in: 127, want: 127},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: -128, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: -128, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: -127, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: -127, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: -1, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: -1, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: 0, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: 1, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: 1, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: 126, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: 126, want: 0},
+ test_int8{fn: and_0_int8, fnname: "and_0_int8", in: 127, want: 0},
+ test_int8{fn: and_int8_0, fnname: "and_int8_0", in: 127, want: 0},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: -128, want: 0},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: -128, want: 0},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: -127, want: 1},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: -127, want: 1},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: -1, want: 1},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: -1, want: 1},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: 0, want: 0},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: 1, want: 1},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: 1, want: 1},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: 126, want: 0},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: 126, want: 0},
+ test_int8{fn: and_1_int8, fnname: "and_1_int8", in: 127, want: 1},
+ test_int8{fn: and_int8_1, fnname: "and_int8_1", in: 127, want: 1},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: -128, want: 0},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: -128, want: 0},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: -127, want: 0},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: -127, want: 0},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: -1, want: 126},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: -1, want: 126},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: 0, want: 0},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: 1, want: 0},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: 1, want: 0},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: 126, want: 126},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: 126, want: 126},
+ test_int8{fn: and_126_int8, fnname: "and_126_int8", in: 127, want: 126},
+ test_int8{fn: and_int8_126, fnname: "and_int8_126", in: 127, want: 126},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: -128, want: 0},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: -128, want: 0},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: -127, want: 1},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: -127, want: 1},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: -1, want: 127},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: -1, want: 127},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: 0, want: 0},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: 0, want: 0},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: 1, want: 1},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: 1, want: 1},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: 126, want: 126},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: 126, want: 126},
+ test_int8{fn: and_127_int8, fnname: "and_127_int8", in: 127, want: 127},
+ test_int8{fn: and_int8_127, fnname: "and_int8_127", in: 127, want: 127},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: -128, want: -128},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: -128, want: -128},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: -127, want: -127},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: -127, want: -127},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: -1, want: -1},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: 0, want: -128},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: 0, want: -128},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: 1, want: -127},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: 1, want: -127},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: 126, want: -2},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: 126, want: -2},
+ test_int8{fn: or_Neg128_int8, fnname: "or_Neg128_int8", in: 127, want: -1},
+ test_int8{fn: or_int8_Neg128, fnname: "or_int8_Neg128", in: 127, want: -1},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: -128, want: -127},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: -128, want: -127},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: -127, want: -127},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: -127, want: -127},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: -1, want: -1},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: 0, want: -127},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: 0, want: -127},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: 1, want: -127},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: 1, want: -127},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: 126, want: -1},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: 126, want: -1},
+ test_int8{fn: or_Neg127_int8, fnname: "or_Neg127_int8", in: 127, want: -1},
+ test_int8{fn: or_int8_Neg127, fnname: "or_int8_Neg127", in: 127, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: -128, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: -128, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: -127, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: -127, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: -1, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: 0, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: 0, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: 1, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: 1, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: 126, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: 126, want: -1},
+ test_int8{fn: or_Neg1_int8, fnname: "or_Neg1_int8", in: 127, want: -1},
+ test_int8{fn: or_int8_Neg1, fnname: "or_int8_Neg1", in: 127, want: -1},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: -128, want: -128},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: -128, want: -128},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: -127, want: -127},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: -127, want: -127},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: -1, want: -1},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: 0, want: 0},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: 0, want: 0},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: 1, want: 1},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: 1, want: 1},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: 126, want: 126},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: 126, want: 126},
+ test_int8{fn: or_0_int8, fnname: "or_0_int8", in: 127, want: 127},
+ test_int8{fn: or_int8_0, fnname: "or_int8_0", in: 127, want: 127},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: -128, want: -127},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: -128, want: -127},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: -127, want: -127},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: -127, want: -127},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: -1, want: -1},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: 0, want: 1},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: 0, want: 1},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: 1, want: 1},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: 1, want: 1},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: 126, want: 127},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: 126, want: 127},
+ test_int8{fn: or_1_int8, fnname: "or_1_int8", in: 127, want: 127},
+ test_int8{fn: or_int8_1, fnname: "or_int8_1", in: 127, want: 127},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: -128, want: -2},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: -128, want: -2},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: -127, want: -1},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: -127, want: -1},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: -1, want: -1},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: 0, want: 126},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: 0, want: 126},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: 1, want: 127},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: 1, want: 127},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: 126, want: 126},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: 126, want: 126},
+ test_int8{fn: or_126_int8, fnname: "or_126_int8", in: 127, want: 127},
+ test_int8{fn: or_int8_126, fnname: "or_int8_126", in: 127, want: 127},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: -128, want: -1},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: -128, want: -1},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: -127, want: -1},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: -127, want: -1},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: -1, want: -1},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: -1, want: -1},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: 0, want: 127},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: 0, want: 127},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: 1, want: 127},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: 1, want: 127},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: 126, want: 127},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: 126, want: 127},
+ test_int8{fn: or_127_int8, fnname: "or_127_int8", in: 127, want: 127},
+ test_int8{fn: or_int8_127, fnname: "or_int8_127", in: 127, want: 127},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: -128, want: 0},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: -128, want: 0},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: -127, want: 1},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: -127, want: 1},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: -1, want: 127},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: -1, want: 127},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: 0, want: -128},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: 0, want: -128},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: 1, want: -127},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: 1, want: -127},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: 126, want: -2},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: 126, want: -2},
+ test_int8{fn: xor_Neg128_int8, fnname: "xor_Neg128_int8", in: 127, want: -1},
+ test_int8{fn: xor_int8_Neg128, fnname: "xor_int8_Neg128", in: 127, want: -1},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: -128, want: 1},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: -128, want: 1},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: -127, want: 0},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: -127, want: 0},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: -1, want: 126},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: -1, want: 126},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: 0, want: -127},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: 0, want: -127},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: 1, want: -128},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: 1, want: -128},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: 126, want: -1},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: 126, want: -1},
+ test_int8{fn: xor_Neg127_int8, fnname: "xor_Neg127_int8", in: 127, want: -2},
+ test_int8{fn: xor_int8_Neg127, fnname: "xor_int8_Neg127", in: 127, want: -2},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: -128, want: 127},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: -128, want: 127},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: -127, want: 126},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: -127, want: 126},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: -1, want: 0},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: -1, want: 0},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: 0, want: -1},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: 0, want: -1},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: 1, want: -2},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: 1, want: -2},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: 126, want: -127},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: 126, want: -127},
+ test_int8{fn: xor_Neg1_int8, fnname: "xor_Neg1_int8", in: 127, want: -128},
+ test_int8{fn: xor_int8_Neg1, fnname: "xor_int8_Neg1", in: 127, want: -128},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: -128, want: -128},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: -128, want: -128},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: -127, want: -127},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: -127, want: -127},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: -1, want: -1},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: -1, want: -1},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: 0, want: 0},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: 0, want: 0},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: 1, want: 1},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: 1, want: 1},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: 126, want: 126},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: 126, want: 126},
+ test_int8{fn: xor_0_int8, fnname: "xor_0_int8", in: 127, want: 127},
+ test_int8{fn: xor_int8_0, fnname: "xor_int8_0", in: 127, want: 127},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: -128, want: -127},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: -128, want: -127},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: -127, want: -128},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: -127, want: -128},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: -1, want: -2},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: -1, want: -2},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: 0, want: 1},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: 0, want: 1},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: 1, want: 0},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: 1, want: 0},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: 126, want: 127},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: 126, want: 127},
+ test_int8{fn: xor_1_int8, fnname: "xor_1_int8", in: 127, want: 126},
+ test_int8{fn: xor_int8_1, fnname: "xor_int8_1", in: 127, want: 126},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: -128, want: -2},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: -128, want: -2},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: -127, want: -1},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: -127, want: -1},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: -1, want: -127},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: -1, want: -127},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: 0, want: 126},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: 0, want: 126},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: 1, want: 127},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: 1, want: 127},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: 126, want: 0},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: 126, want: 0},
+ test_int8{fn: xor_126_int8, fnname: "xor_126_int8", in: 127, want: 1},
+ test_int8{fn: xor_int8_126, fnname: "xor_int8_126", in: 127, want: 1},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: -128, want: -1},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: -128, want: -1},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: -127, want: -2},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: -127, want: -2},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: -1, want: -128},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: -1, want: -128},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: 0, want: 127},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: 0, want: 127},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: 1, want: 126},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: 1, want: 126},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: 126, want: 1},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: 126, want: 1},
+ test_int8{fn: xor_127_int8, fnname: "xor_127_int8", in: 127, want: 0},
+ test_int8{fn: xor_int8_127, fnname: "xor_int8_127", in: 127, want: 0}}
+
+// TestArithmeticConst tests results for arithmetic operations against constants.
+func TestArithmeticConst(t *testing.T) {
+ for _, test := range tests_uint64 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_uint64mul {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int64 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int64mul {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_uint32 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_uint32mul {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int32 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int32mul {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_uint16 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int16 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_uint8 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+ for _, test := range tests_int8 {
+ if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+
+}
diff --git a/src/cmd/compile/internal/test/testdata/arith_test.go b/src/cmd/compile/internal/test/testdata/arith_test.go
new file mode 100644
index 0000000..2b8cd9f
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/arith_test.go
@@ -0,0 +1,1498 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests arithmetic expressions
+
+package main
+
+import (
+ "math"
+ "runtime"
+ "testing"
+)
+
+const (
+ y = 0x0fffFFFF
+)
+
+var (
+ g8 int8
+ g16 int16
+ g32 int32
+ g64 int64
+)
+
+//go:noinline
+func lshNop1(x uint64) uint64 {
+ // two outer shifts should be removed
+ return (((x << 5) >> 2) << 2)
+}
+
+//go:noinline
+func lshNop2(x uint64) uint64 {
+ return (((x << 5) >> 2) << 3)
+}
+
+//go:noinline
+func lshNop3(x uint64) uint64 {
+ return (((x << 5) >> 2) << 6)
+}
+
+//go:noinline
+func lshNotNop(x uint64) uint64 {
+ // outer shift can't be removed
+ return (((x << 5) >> 2) << 1)
+}
+
+//go:noinline
+func rshNop1(x uint64) uint64 {
+ return (((x >> 5) << 2) >> 2)
+}
+
+//go:noinline
+func rshNop2(x uint64) uint64 {
+ return (((x >> 5) << 2) >> 3)
+}
+
+//go:noinline
+func rshNop3(x uint64) uint64 {
+ return (((x >> 5) << 2) >> 6)
+}
+
+//go:noinline
+func rshNotNop(x uint64) uint64 {
+ return (((x >> 5) << 2) >> 1)
+}
+
+func testShiftRemoval(t *testing.T) {
+ allSet := ^uint64(0)
+ if want, got := uint64(0x7ffffffffffffff), rshNop1(allSet); want != got {
+ t.Errorf("testShiftRemoval rshNop1 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0x3ffffffffffffff), rshNop2(allSet); want != got {
+ t.Errorf("testShiftRemoval rshNop2 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0x7fffffffffffff), rshNop3(allSet); want != got {
+ t.Errorf("testShiftRemoval rshNop3 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0xffffffffffffffe), rshNotNop(allSet); want != got {
+ t.Errorf("testShiftRemoval rshNotNop failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0xffffffffffffffe0), lshNop1(allSet); want != got {
+ t.Errorf("testShiftRemoval lshNop1 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0xffffffffffffffc0), lshNop2(allSet); want != got {
+ t.Errorf("testShiftRemoval lshNop2 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0xfffffffffffffe00), lshNop3(allSet); want != got {
+ t.Errorf("testShiftRemoval lshNop3 failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint64(0x7ffffffffffffff0), lshNotNop(allSet); want != got {
+ t.Errorf("testShiftRemoval lshNotNop failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func parseLE64(b []byte) uint64 {
+ // skip the first two bytes, and parse the remaining 8 as a uint64
+ return uint64(b[2]) | uint64(b[3])<<8 | uint64(b[4])<<16 | uint64(b[5])<<24 |
+ uint64(b[6])<<32 | uint64(b[7])<<40 | uint64(b[8])<<48 | uint64(b[9])<<56
+}
+
+//go:noinline
+func parseLE32(b []byte) uint32 {
+ return uint32(b[2]) | uint32(b[3])<<8 | uint32(b[4])<<16 | uint32(b[5])<<24
+}
+
+//go:noinline
+func parseLE16(b []byte) uint16 {
+ return uint16(b[2]) | uint16(b[3])<<8
+}
+
+// testLoadCombine tests for issue #14694 where load combining didn't respect the pointer offset.
+func testLoadCombine(t *testing.T) {
+ testData := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09}
+ if want, got := uint64(0x0908070605040302), parseLE64(testData); want != got {
+ t.Errorf("testLoadCombine failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(0x05040302), parseLE32(testData); want != got {
+ t.Errorf("testLoadCombine failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint16(0x0302), parseLE16(testData); want != got {
+ t.Errorf("testLoadCombine failed, wanted %d got %d", want, got)
+ }
+}
+
+var loadSymData = [...]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}
+
+func testLoadSymCombine(t *testing.T) {
+ w2 := uint16(0x0201)
+ g2 := uint16(loadSymData[0]) | uint16(loadSymData[1])<<8
+ if g2 != w2 {
+ t.Errorf("testLoadSymCombine failed, wanted %d got %d", w2, g2)
+ }
+ w4 := uint32(0x04030201)
+ g4 := uint32(loadSymData[0]) | uint32(loadSymData[1])<<8 |
+ uint32(loadSymData[2])<<16 | uint32(loadSymData[3])<<24
+ if g4 != w4 {
+ t.Errorf("testLoadSymCombine failed, wanted %d got %d", w4, g4)
+ }
+ w8 := uint64(0x0807060504030201)
+ g8 := uint64(loadSymData[0]) | uint64(loadSymData[1])<<8 |
+ uint64(loadSymData[2])<<16 | uint64(loadSymData[3])<<24 |
+ uint64(loadSymData[4])<<32 | uint64(loadSymData[5])<<40 |
+ uint64(loadSymData[6])<<48 | uint64(loadSymData[7])<<56
+ if g8 != w8 {
+ t.Errorf("testLoadSymCombine failed, wanted %d got %d", w8, g8)
+ }
+}
+
+//go:noinline
+func invalidAdd_ssa(x uint32) uint32 {
+ return x + y + y + y + y + y + y + y + y + y + y + y + y + y + y + y + y + y
+}
+
+//go:noinline
+func invalidSub_ssa(x uint32) uint32 {
+ return x - y - y - y - y - y - y - y - y - y - y - y - y - y - y - y - y - y
+}
+
+//go:noinline
+func invalidMul_ssa(x uint32) uint32 {
+ return x * y * y * y * y * y * y * y * y * y * y * y * y * y * y * y * y * y
+}
+
+// testLargeConst tests a situation where larger than 32 bit consts were passed to ADDL
+// causing an invalid instruction error.
+func testLargeConst(t *testing.T) {
+ if want, got := uint32(268435440), invalidAdd_ssa(1); want != got {
+ t.Errorf("testLargeConst add failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(4026531858), invalidSub_ssa(1); want != got {
+ t.Errorf("testLargeConst sub failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(268435455), invalidMul_ssa(1); want != got {
+ t.Errorf("testLargeConst mul failed, wanted %d got %d", want, got)
+ }
+}
+
+// testArithRshConst ensures that "const >> const" right shifts correctly perform
+// sign extension on the lhs constant
+func testArithRshConst(t *testing.T) {
+ wantu := uint64(0x4000000000000000)
+ if got := arithRshuConst_ssa(); got != wantu {
+ t.Errorf("arithRshuConst failed, wanted %d got %d", wantu, got)
+ }
+
+ wants := int64(-0x4000000000000000)
+ if got := arithRshConst_ssa(); got != wants {
+ t.Errorf("arithRshConst failed, wanted %d got %d", wants, got)
+ }
+}
+
+//go:noinline
+func arithRshuConst_ssa() uint64 {
+ y := uint64(0x8000000000000001)
+ z := uint64(1)
+ return uint64(y >> z)
+}
+
+//go:noinline
+func arithRshConst_ssa() int64 {
+ y := int64(-0x8000000000000000)
+ z := uint64(1)
+ return int64(y >> z)
+}
+
+//go:noinline
+func arithConstShift_ssa(x int64) int64 {
+ return x >> 100
+}
+
+// testArithConstShift tests that right shift by large constants preserve
+// the sign of the input.
+func testArithConstShift(t *testing.T) {
+ want := int64(-1)
+ if got := arithConstShift_ssa(-1); want != got {
+ t.Errorf("arithConstShift_ssa(-1) failed, wanted %d got %d", want, got)
+ }
+ want = 0
+ if got := arithConstShift_ssa(1); want != got {
+ t.Errorf("arithConstShift_ssa(1) failed, wanted %d got %d", want, got)
+ }
+}
+
+// overflowConstShift_ssa verifies that constant folding for shift
+// doesn't wrap (i.e. x << MAX_INT << 1 doesn't get folded to x << 0).
+//
+//go:noinline
+func overflowConstShift64_ssa(x int64) int64 {
+ return x << uint64(0xffffffffffffffff) << uint64(1)
+}
+
+//go:noinline
+func overflowConstShift32_ssa(x int64) int32 {
+ return int32(x) << uint32(0xffffffff) << uint32(1)
+}
+
+//go:noinline
+func overflowConstShift16_ssa(x int64) int16 {
+ return int16(x) << uint16(0xffff) << uint16(1)
+}
+
+//go:noinline
+func overflowConstShift8_ssa(x int64) int8 {
+ return int8(x) << uint8(0xff) << uint8(1)
+}
+
+func testOverflowConstShift(t *testing.T) {
+ want := int64(0)
+ for x := int64(-127); x < int64(127); x++ {
+ got := overflowConstShift64_ssa(x)
+ if want != got {
+ t.Errorf("overflowShift64 failed, wanted %d got %d", want, got)
+ }
+ got = int64(overflowConstShift32_ssa(x))
+ if want != got {
+ t.Errorf("overflowShift32 failed, wanted %d got %d", want, got)
+ }
+ got = int64(overflowConstShift16_ssa(x))
+ if want != got {
+ t.Errorf("overflowShift16 failed, wanted %d got %d", want, got)
+ }
+ got = int64(overflowConstShift8_ssa(x))
+ if want != got {
+ t.Errorf("overflowShift8 failed, wanted %d got %d", want, got)
+ }
+ }
+}
+
+// test64BitConstMult tests that rewrite rules don't fold 64 bit constants
+// into multiply instructions.
+func test64BitConstMult(t *testing.T) {
+ want := int64(103079215109)
+ if got := test64BitConstMult_ssa(1, 2); want != got {
+ t.Errorf("test64BitConstMult failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func test64BitConstMult_ssa(a, b int64) int64 {
+ return 34359738369*a + b*34359738370
+}
+
+// test64BitConstAdd tests that rewrite rules don't fold 64 bit constants
+// into add instructions.
+func test64BitConstAdd(t *testing.T) {
+ want := int64(3567671782835376650)
+ if got := test64BitConstAdd_ssa(1, 2); want != got {
+ t.Errorf("test64BitConstAdd failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func test64BitConstAdd_ssa(a, b int64) int64 {
+ return a + 575815584948629622 + b + 2991856197886747025
+}
+
+// testRegallocCVSpill tests that regalloc spills a value whose last use is the
+// current value.
+func testRegallocCVSpill(t *testing.T) {
+ want := int8(-9)
+ if got := testRegallocCVSpill_ssa(1, 2, 3, 4); want != got {
+ t.Errorf("testRegallocCVSpill failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func testRegallocCVSpill_ssa(a, b, c, d int8) int8 {
+ return a + -32 + b + 63*c*-87*d
+}
+
+func testBitwiseLogic(t *testing.T) {
+ a, b := uint32(57623283), uint32(1314713839)
+ if want, got := uint32(38551779), testBitwiseAnd_ssa(a, b); want != got {
+ t.Errorf("testBitwiseAnd failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(1333785343), testBitwiseOr_ssa(a, b); want != got {
+ t.Errorf("testBitwiseOr failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(1295233564), testBitwiseXor_ssa(a, b); want != got {
+ t.Errorf("testBitwiseXor failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(832), testBitwiseLsh_ssa(13, 4, 2); want != got {
+ t.Errorf("testBitwiseLsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(0), testBitwiseLsh_ssa(13, 25, 15); want != got {
+ t.Errorf("testBitwiseLsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(0), testBitwiseLsh_ssa(-13, 25, 15); want != got {
+ t.Errorf("testBitwiseLsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(-13), testBitwiseRsh_ssa(-832, 4, 2); want != got {
+ t.Errorf("testBitwiseRsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(0), testBitwiseRsh_ssa(13, 25, 15); want != got {
+ t.Errorf("testBitwiseRsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := int32(-1), testBitwiseRsh_ssa(-13, 25, 15); want != got {
+ t.Errorf("testBitwiseRsh failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(0x3ffffff), testBitwiseRshU_ssa(0xffffffff, 4, 2); want != got {
+ t.Errorf("testBitwiseRshU failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(0), testBitwiseRshU_ssa(13, 25, 15); want != got {
+ t.Errorf("testBitwiseRshU failed, wanted %d got %d", want, got)
+ }
+ if want, got := uint32(0), testBitwiseRshU_ssa(0x8aaaaaaa, 25, 15); want != got {
+ t.Errorf("testBitwiseRshU failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func testBitwiseAnd_ssa(a, b uint32) uint32 {
+ return a & b
+}
+
+//go:noinline
+func testBitwiseOr_ssa(a, b uint32) uint32 {
+ return a | b
+}
+
+//go:noinline
+func testBitwiseXor_ssa(a, b uint32) uint32 {
+ return a ^ b
+}
+
+//go:noinline
+func testBitwiseLsh_ssa(a int32, b, c uint32) int32 {
+ return a << b << c
+}
+
+//go:noinline
+func testBitwiseRsh_ssa(a int32, b, c uint32) int32 {
+ return a >> b >> c
+}
+
+//go:noinline
+func testBitwiseRshU_ssa(a uint32, b, c uint32) uint32 {
+ return a >> b >> c
+}
+
+//go:noinline
+func testShiftCX_ssa() int {
+ v1 := uint8(3)
+ v4 := (v1 * v1) ^ v1 | v1 - v1 - v1&v1 ^ uint8(3+2) + v1*1>>0 - v1 | 1 | v1<<(2*3|0-0*0^1)
+ v5 := v4>>(3-0-uint(3)) | v1 | v1 + v1 ^ v4<<(0+1|3&1)<<(uint64(1)<<0*2*0<<0) ^ v1
+ v6 := v5 ^ (v1+v1)*v1 | v1 | v1*v1>>(v1&v1)>>(uint(1)<<0*uint(3)>>1)*v1<<2*v1<<v1 - v1>>2 | (v4 - v1) ^ v1 + v1 ^ v1>>1 | v1 + v1 - v1 ^ v1
+ v7 := v6 & v5 << 0
+ v1++
+ v11 := 2&1 ^ 0 + 3 | int(0^0)<<1>>(1*0*3) ^ 0*0 ^ 3&0*3&3 ^ 3*3 ^ 1 ^ int(2)<<(2*3) + 2 | 2 | 2 ^ 2 + 1 | 3 | 0 ^ int(1)>>1 ^ 2 // int
+ v7--
+ return int(uint64(2*1)<<(3-2)<<uint(3>>v7)-2)&v11 | v11 - int(2)<<0>>(2-1)*(v11*0&v11<<1<<(uint8(2)+v4))
+}
+
+func testShiftCX(t *testing.T) {
+ want := 141
+ if got := testShiftCX_ssa(); want != got {
+ t.Errorf("testShiftCX failed, wanted %d got %d", want, got)
+ }
+}
+
+// testSubqToNegq ensures that the SUBQ -> NEGQ translation works correctly.
+func testSubqToNegq(t *testing.T) {
+ want := int64(-318294940372190156)
+ if got := testSubqToNegq_ssa(1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2); want != got {
+ t.Errorf("testSubqToNegq failed, wanted %d got %d", want, got)
+ }
+}
+
+//go:noinline
+func testSubqToNegq_ssa(a, b, c, d, e, f, g, h, i, j, k int64) int64 {
+ return a + 8207351403619448057 - b - 1779494519303207690 + c*8810076340510052032*d - 4465874067674546219 - e*4361839741470334295 - f + 8688847565426072650*g*8065564729145417479
+}
+
+func testOcom(t *testing.T) {
+ want1, want2 := int32(0x55555555), int32(-0x55555556)
+ if got1, got2 := testOcom_ssa(0x55555555, 0x55555555); want1 != got1 || want2 != got2 {
+ t.Errorf("testOcom failed, wanted %d and %d got %d and %d", want1, want2, got1, got2)
+ }
+}
+
+//go:noinline
+func testOcom_ssa(a, b int32) (int32, int32) {
+ return ^^^^a, ^^^^^b
+}
+
+func lrot1_ssa(w uint8, x uint16, y uint32, z uint64) (a uint8, b uint16, c uint32, d uint64) {
+ a = (w << 5) | (w >> 3)
+ b = (x << 13) | (x >> 3)
+ c = (y << 29) | (y >> 3)
+ d = (z << 61) | (z >> 3)
+ return
+}
+
+//go:noinline
+func lrot2_ssa(w, n uint32) uint32 {
+ // Want to be sure that a "rotate by 32" which
+ // is really 0 | (w >> 0) == w
+ // is correctly compiled.
+ return (w << n) | (w >> (32 - n))
+}
+
+//go:noinline
+func lrot3_ssa(w uint32) uint32 {
+ // Want to be sure that a "rotate by 32" which
+ // is really 0 | (w >> 0) == w
+ // is correctly compiled.
+ return (w << 32) | (w >> (32 - 32))
+}
+
+func testLrot(t *testing.T) {
+ wantA, wantB, wantC, wantD := uint8(0xe1), uint16(0xe001),
+ uint32(0xe0000001), uint64(0xe000000000000001)
+ a, b, c, d := lrot1_ssa(0xf, 0xf, 0xf, 0xf)
+ if a != wantA || b != wantB || c != wantC || d != wantD {
+ t.Errorf("lrot1_ssa(0xf, 0xf, 0xf, 0xf)=%d %d %d %d, got %d %d %d %d", wantA, wantB, wantC, wantD, a, b, c, d)
+ }
+ x := lrot2_ssa(0xb0000001, 32)
+ wantX := uint32(0xb0000001)
+ if x != wantX {
+ t.Errorf("lrot2_ssa(0xb0000001, 32)=%d, got %d", wantX, x)
+ }
+ x = lrot3_ssa(0xb0000001)
+ if x != wantX {
+ t.Errorf("lrot3_ssa(0xb0000001)=%d, got %d", wantX, x)
+ }
+
+}
+
+//go:noinline
+func sub1_ssa() uint64 {
+ v1 := uint64(3) // uint64
+ return v1*v1 - (v1&v1)&v1
+}
+
+//go:noinline
+func sub2_ssa() uint8 {
+ v1 := uint8(0)
+ v3 := v1 + v1 + v1 ^ v1 | 3 + v1 ^ v1 | v1 ^ v1
+ v1-- // dev.ssa doesn't see this one
+ return v1 ^ v1*v1 - v3
+}
+
+func testSubConst(t *testing.T) {
+ x1 := sub1_ssa()
+ want1 := uint64(6)
+ if x1 != want1 {
+ t.Errorf("sub1_ssa()=%d, got %d", want1, x1)
+ }
+ x2 := sub2_ssa()
+ want2 := uint8(251)
+ if x2 != want2 {
+ t.Errorf("sub2_ssa()=%d, got %d", want2, x2)
+ }
+}
+
+//go:noinline
+func orPhi_ssa(a bool, x int) int {
+ v := 0
+ if a {
+ v = -1
+ } else {
+ v = -1
+ }
+ return x | v
+}
+
+func testOrPhi(t *testing.T) {
+ if want, got := -1, orPhi_ssa(true, 4); got != want {
+ t.Errorf("orPhi_ssa(true, 4)=%d, want %d", got, want)
+ }
+ if want, got := -1, orPhi_ssa(false, 0); got != want {
+ t.Errorf("orPhi_ssa(false, 0)=%d, want %d", got, want)
+ }
+}
+
+//go:noinline
+func addshiftLL_ssa(a, b uint32) uint32 {
+ return a + b<<3
+}
+
+//go:noinline
+func subshiftLL_ssa(a, b uint32) uint32 {
+ return a - b<<3
+}
+
+//go:noinline
+func rsbshiftLL_ssa(a, b uint32) uint32 {
+ return a<<3 - b
+}
+
+//go:noinline
+func andshiftLL_ssa(a, b uint32) uint32 {
+ return a & (b << 3)
+}
+
+//go:noinline
+func orshiftLL_ssa(a, b uint32) uint32 {
+ return a | b<<3
+}
+
+//go:noinline
+func xorshiftLL_ssa(a, b uint32) uint32 {
+ return a ^ b<<3
+}
+
+//go:noinline
+func bicshiftLL_ssa(a, b uint32) uint32 {
+ return a &^ (b << 3)
+}
+
+//go:noinline
+func notshiftLL_ssa(a uint32) uint32 {
+ return ^(a << 3)
+}
+
+//go:noinline
+func addshiftRL_ssa(a, b uint32) uint32 {
+ return a + b>>3
+}
+
+//go:noinline
+func subshiftRL_ssa(a, b uint32) uint32 {
+ return a - b>>3
+}
+
+//go:noinline
+func rsbshiftRL_ssa(a, b uint32) uint32 {
+ return a>>3 - b
+}
+
+//go:noinline
+func andshiftRL_ssa(a, b uint32) uint32 {
+ return a & (b >> 3)
+}
+
+//go:noinline
+func orshiftRL_ssa(a, b uint32) uint32 {
+ return a | b>>3
+}
+
+//go:noinline
+func xorshiftRL_ssa(a, b uint32) uint32 {
+ return a ^ b>>3
+}
+
+//go:noinline
+func bicshiftRL_ssa(a, b uint32) uint32 {
+ return a &^ (b >> 3)
+}
+
+//go:noinline
+func notshiftRL_ssa(a uint32) uint32 {
+ return ^(a >> 3)
+}
+
+//go:noinline
+func addshiftRA_ssa(a, b int32) int32 {
+ return a + b>>3
+}
+
+//go:noinline
+func subshiftRA_ssa(a, b int32) int32 {
+ return a - b>>3
+}
+
+//go:noinline
+func rsbshiftRA_ssa(a, b int32) int32 {
+ return a>>3 - b
+}
+
+//go:noinline
+func andshiftRA_ssa(a, b int32) int32 {
+ return a & (b >> 3)
+}
+
+//go:noinline
+func orshiftRA_ssa(a, b int32) int32 {
+ return a | b>>3
+}
+
+//go:noinline
+func xorshiftRA_ssa(a, b int32) int32 {
+ return a ^ b>>3
+}
+
+//go:noinline
+func bicshiftRA_ssa(a, b int32) int32 {
+ return a &^ (b >> 3)
+}
+
+//go:noinline
+func notshiftRA_ssa(a int32) int32 {
+ return ^(a >> 3)
+}
+
+//go:noinline
+func addshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a + b<<s
+}
+
+//go:noinline
+func subshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a - b<<s
+}
+
+//go:noinline
+func rsbshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a<<s - b
+}
+
+//go:noinline
+func andshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a & (b << s)
+}
+
+//go:noinline
+func orshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a | b<<s
+}
+
+//go:noinline
+func xorshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a ^ b<<s
+}
+
+//go:noinline
+func bicshiftLLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a &^ (b << s)
+}
+
+//go:noinline
+func notshiftLLreg_ssa(a uint32, s uint8) uint32 {
+ return ^(a << s)
+}
+
+//go:noinline
+func addshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a + b>>s
+}
+
+//go:noinline
+func subshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a - b>>s
+}
+
+//go:noinline
+func rsbshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a>>s - b
+}
+
+//go:noinline
+func andshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a & (b >> s)
+}
+
+//go:noinline
+func orshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a | b>>s
+}
+
+//go:noinline
+func xorshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a ^ b>>s
+}
+
+//go:noinline
+func bicshiftRLreg_ssa(a, b uint32, s uint8) uint32 {
+ return a &^ (b >> s)
+}
+
+//go:noinline
+func notshiftRLreg_ssa(a uint32, s uint8) uint32 {
+ return ^(a >> s)
+}
+
+//go:noinline
+func addshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a + b>>s
+}
+
+//go:noinline
+func subshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a - b>>s
+}
+
+//go:noinline
+func rsbshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a>>s - b
+}
+
+//go:noinline
+func andshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a & (b >> s)
+}
+
+//go:noinline
+func orshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a | b>>s
+}
+
+//go:noinline
+func xorshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a ^ b>>s
+}
+
+//go:noinline
+func bicshiftRAreg_ssa(a, b int32, s uint8) int32 {
+ return a &^ (b >> s)
+}
+
+//go:noinline
+func notshiftRAreg_ssa(a int32, s uint8) int32 {
+ return ^(a >> s)
+}
+
+// test ARM shifted ops
+func testShiftedOps(t *testing.T) {
+ a, b := uint32(10), uint32(42)
+ if want, got := a+b<<3, addshiftLL_ssa(a, b); got != want {
+ t.Errorf("addshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a-b<<3, subshiftLL_ssa(a, b); got != want {
+ t.Errorf("subshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a<<3-b, rsbshiftLL_ssa(a, b); got != want {
+ t.Errorf("rsbshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a&(b<<3), andshiftLL_ssa(a, b); got != want {
+ t.Errorf("andshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a|b<<3, orshiftLL_ssa(a, b); got != want {
+ t.Errorf("orshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a^b<<3, xorshiftLL_ssa(a, b); got != want {
+ t.Errorf("xorshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a&^(b<<3), bicshiftLL_ssa(a, b); got != want {
+ t.Errorf("bicshiftLL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := ^(a << 3), notshiftLL_ssa(a); got != want {
+ t.Errorf("notshiftLL_ssa(10) = %d want %d", got, want)
+ }
+ if want, got := a+b>>3, addshiftRL_ssa(a, b); got != want {
+ t.Errorf("addshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a-b>>3, subshiftRL_ssa(a, b); got != want {
+ t.Errorf("subshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a>>3-b, rsbshiftRL_ssa(a, b); got != want {
+ t.Errorf("rsbshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a&(b>>3), andshiftRL_ssa(a, b); got != want {
+ t.Errorf("andshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a|b>>3, orshiftRL_ssa(a, b); got != want {
+ t.Errorf("orshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a^b>>3, xorshiftRL_ssa(a, b); got != want {
+ t.Errorf("xorshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := a&^(b>>3), bicshiftRL_ssa(a, b); got != want {
+ t.Errorf("bicshiftRL_ssa(10, 42) = %d want %d", got, want)
+ }
+ if want, got := ^(a >> 3), notshiftRL_ssa(a); got != want {
+ t.Errorf("notshiftRL_ssa(10) = %d want %d", got, want)
+ }
+ c, d := int32(10), int32(-42)
+ if want, got := c+d>>3, addshiftRA_ssa(c, d); got != want {
+ t.Errorf("addshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c-d>>3, subshiftRA_ssa(c, d); got != want {
+ t.Errorf("subshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c>>3-d, rsbshiftRA_ssa(c, d); got != want {
+ t.Errorf("rsbshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c&(d>>3), andshiftRA_ssa(c, d); got != want {
+ t.Errorf("andshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c|d>>3, orshiftRA_ssa(c, d); got != want {
+ t.Errorf("orshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c^d>>3, xorshiftRA_ssa(c, d); got != want {
+ t.Errorf("xorshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := c&^(d>>3), bicshiftRA_ssa(c, d); got != want {
+ t.Errorf("bicshiftRA_ssa(10, -42) = %d want %d", got, want)
+ }
+ if want, got := ^(d >> 3), notshiftRA_ssa(d); got != want {
+ t.Errorf("notshiftRA_ssa(-42) = %d want %d", got, want)
+ }
+ s := uint8(3)
+ if want, got := a+b<<s, addshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("addshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a-b<<s, subshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("subshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a<<s-b, rsbshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("rsbshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a&(b<<s), andshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("andshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a|b<<s, orshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("orshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a^b<<s, xorshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("xorshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a&^(b<<s), bicshiftLLreg_ssa(a, b, s); got != want {
+ t.Errorf("bicshiftLLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := ^(a << s), notshiftLLreg_ssa(a, s); got != want {
+ t.Errorf("notshiftLLreg_ssa(10) = %d want %d", got, want)
+ }
+ if want, got := a+b>>s, addshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("addshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a-b>>s, subshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("subshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a>>s-b, rsbshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("rsbshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a&(b>>s), andshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("andshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a|b>>s, orshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("orshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a^b>>s, xorshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("xorshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := a&^(b>>s), bicshiftRLreg_ssa(a, b, s); got != want {
+ t.Errorf("bicshiftRLreg_ssa(10, 42, 3) = %d want %d", got, want)
+ }
+ if want, got := ^(a >> s), notshiftRLreg_ssa(a, s); got != want {
+ t.Errorf("notshiftRLreg_ssa(10) = %d want %d", got, want)
+ }
+ if want, got := c+d>>s, addshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("addshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c-d>>s, subshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("subshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c>>s-d, rsbshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("rsbshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c&(d>>s), andshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("andshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c|d>>s, orshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("orshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c^d>>s, xorshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("xorshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := c&^(d>>s), bicshiftRAreg_ssa(c, d, s); got != want {
+ t.Errorf("bicshiftRAreg_ssa(10, -42, 3) = %d want %d", got, want)
+ }
+ if want, got := ^(d >> s), notshiftRAreg_ssa(d, s); got != want {
+ t.Errorf("notshiftRAreg_ssa(-42, 3) = %d want %d", got, want)
+ }
+}
+
+// TestArithmetic tests that both backends have the same result for arithmetic expressions.
+func TestArithmetic(t *testing.T) {
+ test64BitConstMult(t)
+ test64BitConstAdd(t)
+ testRegallocCVSpill(t)
+ testSubqToNegq(t)
+ testBitwiseLogic(t)
+ testOcom(t)
+ testLrot(t)
+ testShiftCX(t)
+ testSubConst(t)
+ testOverflowConstShift(t)
+ testArithConstShift(t)
+ testArithRshConst(t)
+ testLargeConst(t)
+ testLoadCombine(t)
+ testLoadSymCombine(t)
+ testShiftRemoval(t)
+ testShiftedOps(t)
+ testDivFixUp(t)
+ testDivisibleSignedPow2(t)
+ testDivisibility(t)
+}
+
+// testDivFixUp ensures that signed division fix-ups are being generated.
+func testDivFixUp(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ t.Error("testDivFixUp failed")
+ if e, ok := r.(runtime.Error); ok {
+ t.Logf("%v\n", e.Error())
+ }
+ }
+ }()
+ var w int8 = -128
+ var x int16 = -32768
+ var y int32 = -2147483648
+ var z int64 = -9223372036854775808
+
+ for i := -5; i < 0; i++ {
+ g8 = w / int8(i)
+ g16 = x / int16(i)
+ g32 = y / int32(i)
+ g64 = z / int64(i)
+ g8 = w % int8(i)
+ g16 = x % int16(i)
+ g32 = y % int32(i)
+ g64 = z % int64(i)
+ }
+}
+
+//go:noinline
+func divisible_int8_2to1(x int8) bool {
+ return x%(1<<1) == 0
+}
+
+//go:noinline
+func divisible_int8_2to2(x int8) bool {
+ return x%(1<<2) == 0
+}
+
+//go:noinline
+func divisible_int8_2to3(x int8) bool {
+ return x%(1<<3) == 0
+}
+
+//go:noinline
+func divisible_int8_2to4(x int8) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int8_2to5(x int8) bool {
+ return x%(1<<5) == 0
+}
+
+//go:noinline
+func divisible_int8_2to6(x int8) bool {
+ return x%(1<<6) == 0
+}
+
+//go:noinline
+func divisible_int16_2to1(x int16) bool {
+ return x%(1<<1) == 0
+}
+
+//go:noinline
+func divisible_int16_2to2(x int16) bool {
+ return x%(1<<2) == 0
+}
+
+//go:noinline
+func divisible_int16_2to3(x int16) bool {
+ return x%(1<<3) == 0
+}
+
+//go:noinline
+func divisible_int16_2to4(x int16) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int16_2to5(x int16) bool {
+ return x%(1<<5) == 0
+}
+
+//go:noinline
+func divisible_int16_2to6(x int16) bool {
+ return x%(1<<6) == 0
+}
+
+//go:noinline
+func divisible_int16_2to7(x int16) bool {
+ return x%(1<<7) == 0
+}
+
+//go:noinline
+func divisible_int16_2to8(x int16) bool {
+ return x%(1<<8) == 0
+}
+
+//go:noinline
+func divisible_int16_2to9(x int16) bool {
+ return x%(1<<9) == 0
+}
+
+//go:noinline
+func divisible_int16_2to10(x int16) bool {
+ return x%(1<<10) == 0
+}
+
+//go:noinline
+func divisible_int16_2to11(x int16) bool {
+ return x%(1<<11) == 0
+}
+
+//go:noinline
+func divisible_int16_2to12(x int16) bool {
+ return x%(1<<12) == 0
+}
+
+//go:noinline
+func divisible_int16_2to13(x int16) bool {
+ return x%(1<<13) == 0
+}
+
+//go:noinline
+func divisible_int16_2to14(x int16) bool {
+ return x%(1<<14) == 0
+}
+
+//go:noinline
+func divisible_int32_2to4(x int32) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int32_2to15(x int32) bool {
+ return x%(1<<15) == 0
+}
+
+//go:noinline
+func divisible_int32_2to26(x int32) bool {
+ return x%(1<<26) == 0
+}
+
+//go:noinline
+func divisible_int64_2to4(x int64) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int64_2to15(x int64) bool {
+ return x%(1<<15) == 0
+}
+
+//go:noinline
+func divisible_int64_2to26(x int64) bool {
+ return x%(1<<26) == 0
+}
+
+//go:noinline
+func divisible_int64_2to34(x int64) bool {
+ return x%(1<<34) == 0
+}
+
+//go:noinline
+func divisible_int64_2to48(x int64) bool {
+ return x%(1<<48) == 0
+}
+
+//go:noinline
+func divisible_int64_2to57(x int64) bool {
+ return x%(1<<57) == 0
+}
+
+// testDivisibleSignedPow2 confirms that x%(1<<k)==0 is rewritten correctly
+func testDivisibleSignedPow2(t *testing.T) {
+ var i int64
+ var pow2 = []int64{
+ 1,
+ 1 << 1,
+ 1 << 2,
+ 1 << 3,
+ 1 << 4,
+ 1 << 5,
+ 1 << 6,
+ 1 << 7,
+ 1 << 8,
+ 1 << 9,
+ 1 << 10,
+ 1 << 11,
+ 1 << 12,
+ 1 << 13,
+ 1 << 14,
+ }
+ // exhaustive test for int8
+ for i = math.MinInt8; i <= math.MaxInt8; i++ {
+ if want, got := int8(i)%int8(pow2[1]) == 0, divisible_int8_2to1(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to1(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(pow2[2]) == 0, divisible_int8_2to2(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to2(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(pow2[3]) == 0, divisible_int8_2to3(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to3(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(pow2[4]) == 0, divisible_int8_2to4(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to4(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(pow2[5]) == 0, divisible_int8_2to5(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to5(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(pow2[6]) == 0, divisible_int8_2to6(int8(i)); got != want {
+ t.Errorf("divisible_int8_2to6(%d) = %v want %v", i, got, want)
+ }
+ }
+ // exhaustive test for int16
+ for i = math.MinInt16; i <= math.MaxInt16; i++ {
+ if want, got := int16(i)%int16(pow2[1]) == 0, divisible_int16_2to1(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to1(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[2]) == 0, divisible_int16_2to2(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to2(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[3]) == 0, divisible_int16_2to3(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to3(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[4]) == 0, divisible_int16_2to4(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to4(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[5]) == 0, divisible_int16_2to5(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to5(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[6]) == 0, divisible_int16_2to6(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to6(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[7]) == 0, divisible_int16_2to7(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to7(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[8]) == 0, divisible_int16_2to8(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to8(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[9]) == 0, divisible_int16_2to9(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to9(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[10]) == 0, divisible_int16_2to10(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to10(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[11]) == 0, divisible_int16_2to11(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to11(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[12]) == 0, divisible_int16_2to12(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to12(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[13]) == 0, divisible_int16_2to13(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to13(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(pow2[14]) == 0, divisible_int16_2to14(int16(i)); got != want {
+ t.Errorf("divisible_int16_2to14(%d) = %v want %v", i, got, want)
+ }
+ }
+ // spot check for int32 and int64
+ var (
+ two4 int64 = 1 << 4
+ two15 int64 = 1 << 15
+ two26 int64 = 1 << 26
+ two34 int64 = 1 << 34
+ two48 int64 = 1 << 48
+ two57 int64 = 1 << 57
+ )
+ var xs = []int64{two4, two4 + 3, -3 * two4, -3*two4 + 1,
+ two15, two15 + 3, -3 * two15, -3*two15 + 1,
+ two26, two26 + 37, -5 * two26, -5*two26 + 2,
+ two34, two34 + 356, -7 * two34, -7*two34 + 13,
+ two48, two48 + 3000, -12 * two48, -12*two48 + 1111,
+ two57, two57 + 397654, -15 * two57, -15*two57 + 11234,
+ }
+ for _, x := range xs {
+ if int64(int32(x)) == x {
+ if want, got := int32(x)%int32(two4) == 0, divisible_int32_2to4(int32(x)); got != want {
+ t.Errorf("divisible_int32_2to4(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := int32(x)%int32(two15) == 0, divisible_int32_2to15(int32(x)); got != want {
+ t.Errorf("divisible_int32_2to15(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := int32(x)%int32(two26) == 0, divisible_int32_2to26(int32(x)); got != want {
+ t.Errorf("divisible_int32_2to26(%d) = %v want %v", x, got, want)
+ }
+ }
+ // spot check for int64
+ if want, got := x%two4 == 0, divisible_int64_2to4(x); got != want {
+ t.Errorf("divisible_int64_2to4(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := x%two15 == 0, divisible_int64_2to15(x); got != want {
+ t.Errorf("divisible_int64_2to15(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := x%two26 == 0, divisible_int64_2to26(x); got != want {
+ t.Errorf("divisible_int64_2to26(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := x%two34 == 0, divisible_int64_2to34(x); got != want {
+ t.Errorf("divisible_int64_2to34(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := x%two48 == 0, divisible_int64_2to48(x); got != want {
+ t.Errorf("divisible_int64_2to48(%d) = %v want %v", x, got, want)
+ }
+
+ if want, got := x%two57 == 0, divisible_int64_2to57(x); got != want {
+ t.Errorf("divisible_int64_2to57(%d) = %v want %v", x, got, want)
+ }
+ }
+}
+
+func div6_uint8(n uint8) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_uint16(n uint16) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_uint32(n uint32) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_uint64(n uint64) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div19_uint8(n uint8) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_uint16(n uint16) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_uint32(n uint32) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_uint64(n uint64) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div6_int8(n int8) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_int16(n int16) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_int32(n int32) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div6_int64(n int64) bool {
+ return n%6 == 0
+}
+
+//go:noinline
+func div19_int8(n int8) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_int16(n int16) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_int32(n int32) bool {
+ return n%19 == 0
+}
+
+//go:noinline
+func div19_int64(n int64) bool {
+ return n%19 == 0
+}
+
+// testDivisibility confirms that rewrite rules x%c ==0 for c constant are correct.
+func testDivisibility(t *testing.T) {
+ // unsigned tests
+ // test an even and an odd divisor
+ var sixU, nineteenU uint64 = 6, 19
+ // test all inputs for uint8, uint16
+ for i := uint64(0); i <= math.MaxUint16; i++ {
+ if i <= math.MaxUint8 {
+ if want, got := uint8(i)%uint8(sixU) == 0, div6_uint8(uint8(i)); got != want {
+ t.Errorf("div6_uint8(%d) = %v want %v", i, got, want)
+ }
+ if want, got := uint8(i)%uint8(nineteenU) == 0, div19_uint8(uint8(i)); got != want {
+ t.Errorf("div6_uint19(%d) = %v want %v", i, got, want)
+ }
+ }
+ if want, got := uint16(i)%uint16(sixU) == 0, div6_uint16(uint16(i)); got != want {
+ t.Errorf("div6_uint16(%d) = %v want %v", i, got, want)
+ }
+ if want, got := uint16(i)%uint16(nineteenU) == 0, div19_uint16(uint16(i)); got != want {
+ t.Errorf("div19_uint16(%d) = %v want %v", i, got, want)
+ }
+ }
+ var maxU32, maxU64 uint64 = math.MaxUint32, math.MaxUint64
+ // spot check inputs for uint32 and uint64
+ xu := []uint64{
+ 0, 1, 2, 3, 4, 5,
+ sixU, 2 * sixU, 3 * sixU, 5 * sixU, 12345 * sixU,
+ sixU + 1, 2*sixU - 5, 3*sixU + 3, 5*sixU + 4, 12345*sixU - 2,
+ nineteenU, 2 * nineteenU, 3 * nineteenU, 5 * nineteenU, 12345 * nineteenU,
+ nineteenU + 1, 2*nineteenU - 5, 3*nineteenU + 3, 5*nineteenU + 4, 12345*nineteenU - 2,
+ maxU32, maxU32 - 1, maxU32 - 2, maxU32 - 3, maxU32 - 4,
+ maxU32 - 5, maxU32 - 6, maxU32 - 7, maxU32 - 8,
+ maxU32 - 9, maxU32 - 10, maxU32 - 11, maxU32 - 12,
+ maxU32 - 13, maxU32 - 14, maxU32 - 15, maxU32 - 16,
+ maxU32 - 17, maxU32 - 18, maxU32 - 19, maxU32 - 20,
+ maxU64, maxU64 - 1, maxU64 - 2, maxU64 - 3, maxU64 - 4,
+ maxU64 - 5, maxU64 - 6, maxU64 - 7, maxU64 - 8,
+ maxU64 - 9, maxU64 - 10, maxU64 - 11, maxU64 - 12,
+ maxU64 - 13, maxU64 - 14, maxU64 - 15, maxU64 - 16,
+ maxU64 - 17, maxU64 - 18, maxU64 - 19, maxU64 - 20,
+ }
+ for _, x := range xu {
+ if x <= maxU32 {
+ if want, got := uint32(x)%uint32(sixU) == 0, div6_uint32(uint32(x)); got != want {
+ t.Errorf("div6_uint32(%d) = %v want %v", x, got, want)
+ }
+ if want, got := uint32(x)%uint32(nineteenU) == 0, div19_uint32(uint32(x)); got != want {
+ t.Errorf("div19_uint32(%d) = %v want %v", x, got, want)
+ }
+ }
+ if want, got := x%sixU == 0, div6_uint64(x); got != want {
+ t.Errorf("div6_uint64(%d) = %v want %v", x, got, want)
+ }
+ if want, got := x%nineteenU == 0, div19_uint64(x); got != want {
+ t.Errorf("div19_uint64(%d) = %v want %v", x, got, want)
+ }
+ }
+
+ // signed tests
+ // test an even and an odd divisor
+ var sixS, nineteenS int64 = 6, 19
+ // test all inputs for int8, int16
+ for i := int64(math.MinInt16); i <= math.MaxInt16; i++ {
+ if math.MinInt8 <= i && i <= math.MaxInt8 {
+ if want, got := int8(i)%int8(sixS) == 0, div6_int8(int8(i)); got != want {
+ t.Errorf("div6_int8(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int8(i)%int8(nineteenS) == 0, div19_int8(int8(i)); got != want {
+ t.Errorf("div6_int19(%d) = %v want %v", i, got, want)
+ }
+ }
+ if want, got := int16(i)%int16(sixS) == 0, div6_int16(int16(i)); got != want {
+ t.Errorf("div6_int16(%d) = %v want %v", i, got, want)
+ }
+ if want, got := int16(i)%int16(nineteenS) == 0, div19_int16(int16(i)); got != want {
+ t.Errorf("div19_int16(%d) = %v want %v", i, got, want)
+ }
+ }
+ var minI32, maxI32, minI64, maxI64 int64 = math.MinInt32, math.MaxInt32, math.MinInt64, math.MaxInt64
+ // spot check inputs for int32 and int64
+ xs := []int64{
+ 0, 1, 2, 3, 4, 5,
+ -1, -2, -3, -4, -5,
+ sixS, 2 * sixS, 3 * sixS, 5 * sixS, 12345 * sixS,
+ sixS + 1, 2*sixS - 5, 3*sixS + 3, 5*sixS + 4, 12345*sixS - 2,
+ -sixS, -2 * sixS, -3 * sixS, -5 * sixS, -12345 * sixS,
+ -sixS + 1, -2*sixS - 5, -3*sixS + 3, -5*sixS + 4, -12345*sixS - 2,
+ nineteenS, 2 * nineteenS, 3 * nineteenS, 5 * nineteenS, 12345 * nineteenS,
+ nineteenS + 1, 2*nineteenS - 5, 3*nineteenS + 3, 5*nineteenS + 4, 12345*nineteenS - 2,
+ -nineteenS, -2 * nineteenS, -3 * nineteenS, -5 * nineteenS, -12345 * nineteenS,
+ -nineteenS + 1, -2*nineteenS - 5, -3*nineteenS + 3, -5*nineteenS + 4, -12345*nineteenS - 2,
+ minI32, minI32 + 1, minI32 + 2, minI32 + 3, minI32 + 4,
+ minI32 + 5, minI32 + 6, minI32 + 7, minI32 + 8,
+ minI32 + 9, minI32 + 10, minI32 + 11, minI32 + 12,
+ minI32 + 13, minI32 + 14, minI32 + 15, minI32 + 16,
+ minI32 + 17, minI32 + 18, minI32 + 19, minI32 + 20,
+ maxI32, maxI32 - 1, maxI32 - 2, maxI32 - 3, maxI32 - 4,
+ maxI32 - 5, maxI32 - 6, maxI32 - 7, maxI32 - 8,
+ maxI32 - 9, maxI32 - 10, maxI32 - 11, maxI32 - 12,
+ maxI32 - 13, maxI32 - 14, maxI32 - 15, maxI32 - 16,
+ maxI32 - 17, maxI32 - 18, maxI32 - 19, maxI32 - 20,
+ minI64, minI64 + 1, minI64 + 2, minI64 + 3, minI64 + 4,
+ minI64 + 5, minI64 + 6, minI64 + 7, minI64 + 8,
+ minI64 + 9, minI64 + 10, minI64 + 11, minI64 + 12,
+ minI64 + 13, minI64 + 14, minI64 + 15, minI64 + 16,
+ minI64 + 17, minI64 + 18, minI64 + 19, minI64 + 20,
+ maxI64, maxI64 - 1, maxI64 - 2, maxI64 - 3, maxI64 - 4,
+ maxI64 - 5, maxI64 - 6, maxI64 - 7, maxI64 - 8,
+ maxI64 - 9, maxI64 - 10, maxI64 - 11, maxI64 - 12,
+ maxI64 - 13, maxI64 - 14, maxI64 - 15, maxI64 - 16,
+ maxI64 - 17, maxI64 - 18, maxI64 - 19, maxI64 - 20,
+ }
+ for _, x := range xs {
+ if minI32 <= x && x <= maxI32 {
+ if want, got := int32(x)%int32(sixS) == 0, div6_int32(int32(x)); got != want {
+ t.Errorf("div6_int32(%d) = %v want %v", x, got, want)
+ }
+ if want, got := int32(x)%int32(nineteenS) == 0, div19_int32(int32(x)); got != want {
+ t.Errorf("div19_int32(%d) = %v want %v", x, got, want)
+ }
+ }
+ if want, got := x%sixS == 0, div6_int64(x); got != want {
+ t.Errorf("div6_int64(%d) = %v want %v", x, got, want)
+ }
+ if want, got := x%nineteenS == 0, div19_int64(x); got != want {
+ t.Errorf("div19_int64(%d) = %v want %v", x, got, want)
+ }
+ }
+}
+
+//go:noinline
+func genREV16_1(c uint64) uint64 {
+ b := ((c & 0xff00ff00ff00ff00) >> 8) | ((c & 0x00ff00ff00ff00ff) << 8)
+ return b
+}
+
+//go:noinline
+func genREV16_2(c uint64) uint64 {
+ b := ((c & 0xff00ff00) >> 8) | ((c & 0x00ff00ff) << 8)
+ return b
+}
+
+//go:noinline
+func genREV16W(c uint32) uint32 {
+ b := ((c & 0xff00ff00) >> 8) | ((c & 0x00ff00ff) << 8)
+ return b
+}
+
+func TestREV16(t *testing.T) {
+ x := uint64(0x8f7f6f5f4f3f2f1f)
+ want1 := uint64(0x7f8f5f6f3f4f1f2f)
+ want2 := uint64(0x3f4f1f2f)
+
+ got1 := genREV16_1(x)
+ if got1 != want1 {
+ t.Errorf("genREV16_1(%#x) = %#x want %#x", x, got1, want1)
+ }
+ got2 := genREV16_2(x)
+ if got2 != want2 {
+ t.Errorf("genREV16_2(%#x) = %#x want %#x", x, got2, want2)
+ }
+}
+
+func TestREV16W(t *testing.T) {
+ x := uint32(0x4f3f2f1f)
+ want := uint32(0x3f4f1f2f)
+
+ got := genREV16W(x)
+ if got != want {
+ t.Errorf("genREV16W(%#x) = %#x want %#x", x, got, want)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/array_test.go b/src/cmd/compile/internal/test/testdata/array_test.go
new file mode 100644
index 0000000..efa00d0
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/array_test.go
@@ -0,0 +1,132 @@
+package main
+
+import "testing"
+
+//go:noinline
+func testSliceLenCap12_ssa(a [10]int, i, j int) (int, int) {
+ b := a[i:j]
+ return len(b), cap(b)
+}
+
+//go:noinline
+func testSliceLenCap1_ssa(a [10]int, i, j int) (int, int) {
+ b := a[i:]
+ return len(b), cap(b)
+}
+
+//go:noinline
+func testSliceLenCap2_ssa(a [10]int, i, j int) (int, int) {
+ b := a[:j]
+ return len(b), cap(b)
+}
+
+func testSliceLenCap(t *testing.T) {
+ a := [10]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
+ tests := [...]struct {
+ fn func(a [10]int, i, j int) (int, int)
+ i, j int // slice range
+ l, c int // len, cap
+ }{
+ // -1 means the value is not used.
+ {testSliceLenCap12_ssa, 0, 0, 0, 10},
+ {testSliceLenCap12_ssa, 0, 1, 1, 10},
+ {testSliceLenCap12_ssa, 0, 10, 10, 10},
+ {testSliceLenCap12_ssa, 10, 10, 0, 0},
+ {testSliceLenCap12_ssa, 0, 5, 5, 10},
+ {testSliceLenCap12_ssa, 5, 5, 0, 5},
+ {testSliceLenCap12_ssa, 5, 10, 5, 5},
+ {testSliceLenCap1_ssa, 0, -1, 0, 10},
+ {testSliceLenCap1_ssa, 5, -1, 5, 5},
+ {testSliceLenCap1_ssa, 10, -1, 0, 0},
+ {testSliceLenCap2_ssa, -1, 0, 0, 10},
+ {testSliceLenCap2_ssa, -1, 5, 5, 10},
+ {testSliceLenCap2_ssa, -1, 10, 10, 10},
+ }
+
+ for i, test := range tests {
+ if l, c := test.fn(a, test.i, test.j); l != test.l && c != test.c {
+ t.Errorf("#%d len(a[%d:%d]), cap(a[%d:%d]) = %d %d, want %d %d", i, test.i, test.j, test.i, test.j, l, c, test.l, test.c)
+ }
+ }
+}
+
+//go:noinline
+func testSliceGetElement_ssa(a [10]int, i, j, p int) int {
+ return a[i:j][p]
+}
+
+func testSliceGetElement(t *testing.T) {
+ a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}
+ tests := [...]struct {
+ i, j, p int
+ want int // a[i:j][p]
+ }{
+ {0, 10, 2, 20},
+ {0, 5, 4, 40},
+ {5, 10, 3, 80},
+ {1, 9, 7, 80},
+ }
+
+ for i, test := range tests {
+ if got := testSliceGetElement_ssa(a, test.i, test.j, test.p); got != test.want {
+ t.Errorf("#%d a[%d:%d][%d] = %d, wanted %d", i, test.i, test.j, test.p, got, test.want)
+ }
+ }
+}
+
+//go:noinline
+func testSliceSetElement_ssa(a *[10]int, i, j, p, x int) {
+ (*a)[i:j][p] = x
+}
+
+func testSliceSetElement(t *testing.T) {
+ a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}
+ tests := [...]struct {
+ i, j, p int
+ want int // a[i:j][p]
+ }{
+ {0, 10, 2, 17},
+ {0, 5, 4, 11},
+ {5, 10, 3, 28},
+ {1, 9, 7, 99},
+ }
+
+ for i, test := range tests {
+ testSliceSetElement_ssa(&a, test.i, test.j, test.p, test.want)
+ if got := a[test.i+test.p]; got != test.want {
+ t.Errorf("#%d a[%d:%d][%d] = %d, wanted %d", i, test.i, test.j, test.p, got, test.want)
+ }
+ }
+}
+
+func testSlicePanic1(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ //println("panicked as expected")
+ }
+ }()
+
+ a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}
+ testSliceLenCap12_ssa(a, 3, 12)
+ t.Errorf("expected to panic, but didn't")
+}
+
+func testSlicePanic2(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ //println("panicked as expected")
+ }
+ }()
+
+ a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}
+ testSliceGetElement_ssa(a, 3, 7, 4)
+ t.Errorf("expected to panic, but didn't")
+}
+
+func TestArray(t *testing.T) {
+ testSliceLenCap(t)
+ testSliceGetElement(t)
+ testSliceSetElement(t)
+ testSlicePanic1(t)
+ testSlicePanic2(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/assert_test.go b/src/cmd/compile/internal/test/testdata/assert_test.go
new file mode 100644
index 0000000..4326be8
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/assert_test.go
@@ -0,0 +1,128 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests type assertion expressions and statements
+
+package main
+
+import (
+ "runtime"
+ "testing"
+)
+
+type (
+ S struct{}
+ U struct{}
+
+ I interface {
+ F()
+ }
+)
+
+var (
+ s *S
+ u *U
+)
+
+func (s *S) F() {}
+func (u *U) F() {}
+
+func e2t_ssa(e interface{}) *U {
+ return e.(*U)
+}
+
+func i2t_ssa(i I) *U {
+ return i.(*U)
+}
+
+func testAssertE2TOk(t *testing.T) {
+ if got := e2t_ssa(u); got != u {
+ t.Errorf("e2t_ssa(u)=%v want %v", got, u)
+ }
+}
+
+func testAssertE2TPanic(t *testing.T) {
+ var got *U
+ defer func() {
+ if got != nil {
+ t.Errorf("e2t_ssa(s)=%v want nil", got)
+ }
+ e := recover()
+ err, ok := e.(*runtime.TypeAssertionError)
+ if !ok {
+ t.Errorf("e2t_ssa(s) panic type %T", e)
+ }
+ want := "interface conversion: interface {} is *main.S, not *main.U"
+ if err.Error() != want {
+ t.Errorf("e2t_ssa(s) wrong error, want '%s', got '%s'", want, err.Error())
+ }
+ }()
+ got = e2t_ssa(s)
+ t.Errorf("e2t_ssa(s) should panic")
+
+}
+
+func testAssertI2TOk(t *testing.T) {
+ if got := i2t_ssa(u); got != u {
+ t.Errorf("i2t_ssa(u)=%v want %v", got, u)
+ }
+}
+
+func testAssertI2TPanic(t *testing.T) {
+ var got *U
+ defer func() {
+ if got != nil {
+ t.Errorf("i2t_ssa(s)=%v want nil", got)
+ }
+ e := recover()
+ err, ok := e.(*runtime.TypeAssertionError)
+ if !ok {
+ t.Errorf("i2t_ssa(s) panic type %T", e)
+ }
+ want := "interface conversion: main.I is *main.S, not *main.U"
+ if err.Error() != want {
+ t.Errorf("i2t_ssa(s) wrong error, want '%s', got '%s'", want, err.Error())
+ }
+ }()
+ got = i2t_ssa(s)
+ t.Errorf("i2t_ssa(s) should panic")
+}
+
+func e2t2_ssa(e interface{}) (*U, bool) {
+ u, ok := e.(*U)
+ return u, ok
+}
+
+func i2t2_ssa(i I) (*U, bool) {
+ u, ok := i.(*U)
+ return u, ok
+}
+
+func testAssertE2T2(t *testing.T) {
+ if got, ok := e2t2_ssa(u); !ok || got != u {
+ t.Errorf("e2t2_ssa(u)=(%v, %v) want (%v, %v)", got, ok, u, true)
+ }
+ if got, ok := e2t2_ssa(s); ok || got != nil {
+ t.Errorf("e2t2_ssa(s)=(%v, %v) want (%v, %v)", got, ok, nil, false)
+ }
+}
+
+func testAssertI2T2(t *testing.T) {
+ if got, ok := i2t2_ssa(u); !ok || got != u {
+ t.Errorf("i2t2_ssa(u)=(%v, %v) want (%v, %v)", got, ok, u, true)
+ }
+ if got, ok := i2t2_ssa(s); ok || got != nil {
+ t.Errorf("i2t2_ssa(s)=(%v, %v) want (%v, %v)", got, ok, nil, false)
+ }
+}
+
+// TestTypeAssertion tests type assertions.
+func TestTypeAssertion(t *testing.T) {
+ testAssertE2TOk(t)
+ testAssertE2TPanic(t)
+ testAssertI2TOk(t)
+ testAssertI2TPanic(t)
+ testAssertE2T2(t)
+ testAssertI2T2(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/break_test.go b/src/cmd/compile/internal/test/testdata/break_test.go
new file mode 100644
index 0000000..50245df
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/break_test.go
@@ -0,0 +1,250 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests continue and break.
+
+package main
+
+import "testing"
+
+func continuePlain_ssa() int {
+ var n int
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ continue
+ }
+ n = i
+ }
+ return n
+}
+
+func continueLabeled_ssa() int {
+ var n int
+Next:
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ continue Next
+ }
+ n = i
+ }
+ return n
+}
+
+func continuePlainInner_ssa() int {
+ var n int
+ for j := 0; j < 30; j += 10 {
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ continue
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+func continueLabeledInner_ssa() int {
+ var n int
+ for j := 0; j < 30; j += 10 {
+ Next:
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ continue Next
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+func continueLabeledOuter_ssa() int {
+ var n int
+Next:
+ for j := 0; j < 30; j += 10 {
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ continue Next
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+func breakPlain_ssa() int {
+ var n int
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break
+ }
+ n = i
+ }
+ return n
+}
+
+func breakLabeled_ssa() int {
+ var n int
+Next:
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break Next
+ }
+ n = i
+ }
+ return n
+}
+
+func breakPlainInner_ssa() int {
+ var n int
+ for j := 0; j < 30; j += 10 {
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+func breakLabeledInner_ssa() int {
+ var n int
+ for j := 0; j < 30; j += 10 {
+ Next:
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break Next
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+func breakLabeledOuter_ssa() int {
+ var n int
+Next:
+ for j := 0; j < 30; j += 10 {
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break Next
+ }
+ n = i
+ }
+ n += j
+ }
+ return n
+}
+
+var g, h int // globals to ensure optimizations don't collapse our switch statements
+
+func switchPlain_ssa() int {
+ var n int
+ switch g {
+ case 0:
+ n = 1
+ break
+ n = 2
+ }
+ return n
+}
+
+func switchLabeled_ssa() int {
+ var n int
+Done:
+ switch g {
+ case 0:
+ n = 1
+ break Done
+ n = 2
+ }
+ return n
+}
+
+func switchPlainInner_ssa() int {
+ var n int
+ switch g {
+ case 0:
+ n = 1
+ switch h {
+ case 0:
+ n += 10
+ break
+ }
+ n = 2
+ }
+ return n
+}
+
+func switchLabeledInner_ssa() int {
+ var n int
+ switch g {
+ case 0:
+ n = 1
+ Done:
+ switch h {
+ case 0:
+ n += 10
+ break Done
+ }
+ n = 2
+ }
+ return n
+}
+
+func switchLabeledOuter_ssa() int {
+ var n int
+Done:
+ switch g {
+ case 0:
+ n = 1
+ switch h {
+ case 0:
+ n += 10
+ break Done
+ }
+ n = 2
+ }
+ return n
+}
+
+// TestBreakContinue tests that continue and break statements do what they say.
+func TestBreakContinue(t *testing.T) {
+ tests := [...]struct {
+ name string
+ fn func() int
+ want int
+ }{
+ {"continuePlain_ssa", continuePlain_ssa, 9},
+ {"continueLabeled_ssa", continueLabeled_ssa, 9},
+ {"continuePlainInner_ssa", continuePlainInner_ssa, 29},
+ {"continueLabeledInner_ssa", continueLabeledInner_ssa, 29},
+ {"continueLabeledOuter_ssa", continueLabeledOuter_ssa, 5},
+
+ {"breakPlain_ssa", breakPlain_ssa, 5},
+ {"breakLabeled_ssa", breakLabeled_ssa, 5},
+ {"breakPlainInner_ssa", breakPlainInner_ssa, 25},
+ {"breakLabeledInner_ssa", breakLabeledInner_ssa, 25},
+ {"breakLabeledOuter_ssa", breakLabeledOuter_ssa, 5},
+
+ {"switchPlain_ssa", switchPlain_ssa, 1},
+ {"switchLabeled_ssa", switchLabeled_ssa, 1},
+ {"switchPlainInner_ssa", switchPlainInner_ssa, 2},
+ {"switchLabeledInner_ssa", switchLabeledInner_ssa, 2},
+ {"switchLabeledOuter_ssa", switchLabeledOuter_ssa, 11},
+
+ // no select tests; they're identical to switch
+ }
+
+ for _, test := range tests {
+ if got := test.fn(); got != test.want {
+ t.Errorf("%s()=%d, want %d", test.name, got, test.want)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/chan_test.go b/src/cmd/compile/internal/test/testdata/chan_test.go
new file mode 100644
index 0000000..628bd8f
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/chan_test.go
@@ -0,0 +1,63 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// chan.go tests chan operations.
+package main
+
+import "testing"
+
+//go:noinline
+func lenChan_ssa(v chan int) int {
+ return len(v)
+}
+
+//go:noinline
+func capChan_ssa(v chan int) int {
+ return cap(v)
+}
+
+func testLenChan(t *testing.T) {
+
+ v := make(chan int, 10)
+ v <- 1
+ v <- 1
+ v <- 1
+
+ if want, got := 3, lenChan_ssa(v); got != want {
+ t.Errorf("expected len(chan) = %d, got %d", want, got)
+ }
+}
+
+func testLenNilChan(t *testing.T) {
+
+ var v chan int
+ if want, got := 0, lenChan_ssa(v); got != want {
+ t.Errorf("expected len(nil) = %d, got %d", want, got)
+ }
+}
+
+func testCapChan(t *testing.T) {
+
+ v := make(chan int, 25)
+
+ if want, got := 25, capChan_ssa(v); got != want {
+ t.Errorf("expected cap(chan) = %d, got %d", want, got)
+ }
+}
+
+func testCapNilChan(t *testing.T) {
+
+ var v chan int
+ if want, got := 0, capChan_ssa(v); got != want {
+ t.Errorf("expected cap(nil) = %d, got %d", want, got)
+ }
+}
+
+func TestChan(t *testing.T) {
+ testLenChan(t)
+ testLenNilChan(t)
+
+ testCapChan(t)
+ testCapNilChan(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/closure_test.go b/src/cmd/compile/internal/test/testdata/closure_test.go
new file mode 100644
index 0000000..6cddc2d
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/closure_test.go
@@ -0,0 +1,32 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// closure.go tests closure operations.
+package main
+
+import "testing"
+
+//go:noinline
+func testCFunc_ssa() int {
+ a := 0
+ b := func() {
+ switch {
+ }
+ a++
+ }
+ b()
+ b()
+ return a
+}
+
+func testCFunc(t *testing.T) {
+ if want, got := 2, testCFunc_ssa(); got != want {
+ t.Errorf("expected %d, got %d", want, got)
+ }
+}
+
+// TestClosure tests closure related behavior.
+func TestClosure(t *testing.T) {
+ testCFunc(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/cmpConst_test.go b/src/cmd/compile/internal/test/testdata/cmpConst_test.go
new file mode 100644
index 0000000..9400ef4
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/cmpConst_test.go
@@ -0,0 +1,2209 @@
+// Code generated by gen/cmpConstGen.go. DO NOT EDIT.
+
+package main
+
+import (
+ "reflect"
+ "runtime"
+ "testing"
+)
+
+// results show the expected result for the elements left of, equal to and right of the index.
+type result struct{ l, e, r bool }
+
+var (
+ eq = result{l: false, e: true, r: false}
+ ne = result{l: true, e: false, r: true}
+ lt = result{l: true, e: false, r: false}
+ le = result{l: true, e: true, r: false}
+ gt = result{l: false, e: false, r: true}
+ ge = result{l: false, e: true, r: true}
+)
+
+// uint64 tests
+var uint64_vals = []uint64{
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+ 32768,
+ 65534,
+ 65535,
+ 65536,
+ 2147483646,
+ 2147483647,
+ 2147483648,
+ 4278190080,
+ 4294967294,
+ 4294967295,
+ 4294967296,
+ 1095216660480,
+ 9223372036854775806,
+ 9223372036854775807,
+ 9223372036854775808,
+ 18374686479671623680,
+ 18446744073709551614,
+ 18446744073709551615,
+}
+
+func lt_0_uint64(x uint64) bool { return x < 0 }
+func le_0_uint64(x uint64) bool { return x <= 0 }
+func gt_0_uint64(x uint64) bool { return x > 0 }
+func ge_0_uint64(x uint64) bool { return x >= 0 }
+func eq_0_uint64(x uint64) bool { return x == 0 }
+func ne_0_uint64(x uint64) bool { return x != 0 }
+func lt_1_uint64(x uint64) bool { return x < 1 }
+func le_1_uint64(x uint64) bool { return x <= 1 }
+func gt_1_uint64(x uint64) bool { return x > 1 }
+func ge_1_uint64(x uint64) bool { return x >= 1 }
+func eq_1_uint64(x uint64) bool { return x == 1 }
+func ne_1_uint64(x uint64) bool { return x != 1 }
+func lt_126_uint64(x uint64) bool { return x < 126 }
+func le_126_uint64(x uint64) bool { return x <= 126 }
+func gt_126_uint64(x uint64) bool { return x > 126 }
+func ge_126_uint64(x uint64) bool { return x >= 126 }
+func eq_126_uint64(x uint64) bool { return x == 126 }
+func ne_126_uint64(x uint64) bool { return x != 126 }
+func lt_127_uint64(x uint64) bool { return x < 127 }
+func le_127_uint64(x uint64) bool { return x <= 127 }
+func gt_127_uint64(x uint64) bool { return x > 127 }
+func ge_127_uint64(x uint64) bool { return x >= 127 }
+func eq_127_uint64(x uint64) bool { return x == 127 }
+func ne_127_uint64(x uint64) bool { return x != 127 }
+func lt_128_uint64(x uint64) bool { return x < 128 }
+func le_128_uint64(x uint64) bool { return x <= 128 }
+func gt_128_uint64(x uint64) bool { return x > 128 }
+func ge_128_uint64(x uint64) bool { return x >= 128 }
+func eq_128_uint64(x uint64) bool { return x == 128 }
+func ne_128_uint64(x uint64) bool { return x != 128 }
+func lt_254_uint64(x uint64) bool { return x < 254 }
+func le_254_uint64(x uint64) bool { return x <= 254 }
+func gt_254_uint64(x uint64) bool { return x > 254 }
+func ge_254_uint64(x uint64) bool { return x >= 254 }
+func eq_254_uint64(x uint64) bool { return x == 254 }
+func ne_254_uint64(x uint64) bool { return x != 254 }
+func lt_255_uint64(x uint64) bool { return x < 255 }
+func le_255_uint64(x uint64) bool { return x <= 255 }
+func gt_255_uint64(x uint64) bool { return x > 255 }
+func ge_255_uint64(x uint64) bool { return x >= 255 }
+func eq_255_uint64(x uint64) bool { return x == 255 }
+func ne_255_uint64(x uint64) bool { return x != 255 }
+func lt_256_uint64(x uint64) bool { return x < 256 }
+func le_256_uint64(x uint64) bool { return x <= 256 }
+func gt_256_uint64(x uint64) bool { return x > 256 }
+func ge_256_uint64(x uint64) bool { return x >= 256 }
+func eq_256_uint64(x uint64) bool { return x == 256 }
+func ne_256_uint64(x uint64) bool { return x != 256 }
+func lt_32766_uint64(x uint64) bool { return x < 32766 }
+func le_32766_uint64(x uint64) bool { return x <= 32766 }
+func gt_32766_uint64(x uint64) bool { return x > 32766 }
+func ge_32766_uint64(x uint64) bool { return x >= 32766 }
+func eq_32766_uint64(x uint64) bool { return x == 32766 }
+func ne_32766_uint64(x uint64) bool { return x != 32766 }
+func lt_32767_uint64(x uint64) bool { return x < 32767 }
+func le_32767_uint64(x uint64) bool { return x <= 32767 }
+func gt_32767_uint64(x uint64) bool { return x > 32767 }
+func ge_32767_uint64(x uint64) bool { return x >= 32767 }
+func eq_32767_uint64(x uint64) bool { return x == 32767 }
+func ne_32767_uint64(x uint64) bool { return x != 32767 }
+func lt_32768_uint64(x uint64) bool { return x < 32768 }
+func le_32768_uint64(x uint64) bool { return x <= 32768 }
+func gt_32768_uint64(x uint64) bool { return x > 32768 }
+func ge_32768_uint64(x uint64) bool { return x >= 32768 }
+func eq_32768_uint64(x uint64) bool { return x == 32768 }
+func ne_32768_uint64(x uint64) bool { return x != 32768 }
+func lt_65534_uint64(x uint64) bool { return x < 65534 }
+func le_65534_uint64(x uint64) bool { return x <= 65534 }
+func gt_65534_uint64(x uint64) bool { return x > 65534 }
+func ge_65534_uint64(x uint64) bool { return x >= 65534 }
+func eq_65534_uint64(x uint64) bool { return x == 65534 }
+func ne_65534_uint64(x uint64) bool { return x != 65534 }
+func lt_65535_uint64(x uint64) bool { return x < 65535 }
+func le_65535_uint64(x uint64) bool { return x <= 65535 }
+func gt_65535_uint64(x uint64) bool { return x > 65535 }
+func ge_65535_uint64(x uint64) bool { return x >= 65535 }
+func eq_65535_uint64(x uint64) bool { return x == 65535 }
+func ne_65535_uint64(x uint64) bool { return x != 65535 }
+func lt_65536_uint64(x uint64) bool { return x < 65536 }
+func le_65536_uint64(x uint64) bool { return x <= 65536 }
+func gt_65536_uint64(x uint64) bool { return x > 65536 }
+func ge_65536_uint64(x uint64) bool { return x >= 65536 }
+func eq_65536_uint64(x uint64) bool { return x == 65536 }
+func ne_65536_uint64(x uint64) bool { return x != 65536 }
+func lt_2147483646_uint64(x uint64) bool { return x < 2147483646 }
+func le_2147483646_uint64(x uint64) bool { return x <= 2147483646 }
+func gt_2147483646_uint64(x uint64) bool { return x > 2147483646 }
+func ge_2147483646_uint64(x uint64) bool { return x >= 2147483646 }
+func eq_2147483646_uint64(x uint64) bool { return x == 2147483646 }
+func ne_2147483646_uint64(x uint64) bool { return x != 2147483646 }
+func lt_2147483647_uint64(x uint64) bool { return x < 2147483647 }
+func le_2147483647_uint64(x uint64) bool { return x <= 2147483647 }
+func gt_2147483647_uint64(x uint64) bool { return x > 2147483647 }
+func ge_2147483647_uint64(x uint64) bool { return x >= 2147483647 }
+func eq_2147483647_uint64(x uint64) bool { return x == 2147483647 }
+func ne_2147483647_uint64(x uint64) bool { return x != 2147483647 }
+func lt_2147483648_uint64(x uint64) bool { return x < 2147483648 }
+func le_2147483648_uint64(x uint64) bool { return x <= 2147483648 }
+func gt_2147483648_uint64(x uint64) bool { return x > 2147483648 }
+func ge_2147483648_uint64(x uint64) bool { return x >= 2147483648 }
+func eq_2147483648_uint64(x uint64) bool { return x == 2147483648 }
+func ne_2147483648_uint64(x uint64) bool { return x != 2147483648 }
+func lt_4278190080_uint64(x uint64) bool { return x < 4278190080 }
+func le_4278190080_uint64(x uint64) bool { return x <= 4278190080 }
+func gt_4278190080_uint64(x uint64) bool { return x > 4278190080 }
+func ge_4278190080_uint64(x uint64) bool { return x >= 4278190080 }
+func eq_4278190080_uint64(x uint64) bool { return x == 4278190080 }
+func ne_4278190080_uint64(x uint64) bool { return x != 4278190080 }
+func lt_4294967294_uint64(x uint64) bool { return x < 4294967294 }
+func le_4294967294_uint64(x uint64) bool { return x <= 4294967294 }
+func gt_4294967294_uint64(x uint64) bool { return x > 4294967294 }
+func ge_4294967294_uint64(x uint64) bool { return x >= 4294967294 }
+func eq_4294967294_uint64(x uint64) bool { return x == 4294967294 }
+func ne_4294967294_uint64(x uint64) bool { return x != 4294967294 }
+func lt_4294967295_uint64(x uint64) bool { return x < 4294967295 }
+func le_4294967295_uint64(x uint64) bool { return x <= 4294967295 }
+func gt_4294967295_uint64(x uint64) bool { return x > 4294967295 }
+func ge_4294967295_uint64(x uint64) bool { return x >= 4294967295 }
+func eq_4294967295_uint64(x uint64) bool { return x == 4294967295 }
+func ne_4294967295_uint64(x uint64) bool { return x != 4294967295 }
+func lt_4294967296_uint64(x uint64) bool { return x < 4294967296 }
+func le_4294967296_uint64(x uint64) bool { return x <= 4294967296 }
+func gt_4294967296_uint64(x uint64) bool { return x > 4294967296 }
+func ge_4294967296_uint64(x uint64) bool { return x >= 4294967296 }
+func eq_4294967296_uint64(x uint64) bool { return x == 4294967296 }
+func ne_4294967296_uint64(x uint64) bool { return x != 4294967296 }
+func lt_1095216660480_uint64(x uint64) bool { return x < 1095216660480 }
+func le_1095216660480_uint64(x uint64) bool { return x <= 1095216660480 }
+func gt_1095216660480_uint64(x uint64) bool { return x > 1095216660480 }
+func ge_1095216660480_uint64(x uint64) bool { return x >= 1095216660480 }
+func eq_1095216660480_uint64(x uint64) bool { return x == 1095216660480 }
+func ne_1095216660480_uint64(x uint64) bool { return x != 1095216660480 }
+func lt_9223372036854775806_uint64(x uint64) bool { return x < 9223372036854775806 }
+func le_9223372036854775806_uint64(x uint64) bool { return x <= 9223372036854775806 }
+func gt_9223372036854775806_uint64(x uint64) bool { return x > 9223372036854775806 }
+func ge_9223372036854775806_uint64(x uint64) bool { return x >= 9223372036854775806 }
+func eq_9223372036854775806_uint64(x uint64) bool { return x == 9223372036854775806 }
+func ne_9223372036854775806_uint64(x uint64) bool { return x != 9223372036854775806 }
+func lt_9223372036854775807_uint64(x uint64) bool { return x < 9223372036854775807 }
+func le_9223372036854775807_uint64(x uint64) bool { return x <= 9223372036854775807 }
+func gt_9223372036854775807_uint64(x uint64) bool { return x > 9223372036854775807 }
+func ge_9223372036854775807_uint64(x uint64) bool { return x >= 9223372036854775807 }
+func eq_9223372036854775807_uint64(x uint64) bool { return x == 9223372036854775807 }
+func ne_9223372036854775807_uint64(x uint64) bool { return x != 9223372036854775807 }
+func lt_9223372036854775808_uint64(x uint64) bool { return x < 9223372036854775808 }
+func le_9223372036854775808_uint64(x uint64) bool { return x <= 9223372036854775808 }
+func gt_9223372036854775808_uint64(x uint64) bool { return x > 9223372036854775808 }
+func ge_9223372036854775808_uint64(x uint64) bool { return x >= 9223372036854775808 }
+func eq_9223372036854775808_uint64(x uint64) bool { return x == 9223372036854775808 }
+func ne_9223372036854775808_uint64(x uint64) bool { return x != 9223372036854775808 }
+func lt_18374686479671623680_uint64(x uint64) bool { return x < 18374686479671623680 }
+func le_18374686479671623680_uint64(x uint64) bool { return x <= 18374686479671623680 }
+func gt_18374686479671623680_uint64(x uint64) bool { return x > 18374686479671623680 }
+func ge_18374686479671623680_uint64(x uint64) bool { return x >= 18374686479671623680 }
+func eq_18374686479671623680_uint64(x uint64) bool { return x == 18374686479671623680 }
+func ne_18374686479671623680_uint64(x uint64) bool { return x != 18374686479671623680 }
+func lt_18446744073709551614_uint64(x uint64) bool { return x < 18446744073709551614 }
+func le_18446744073709551614_uint64(x uint64) bool { return x <= 18446744073709551614 }
+func gt_18446744073709551614_uint64(x uint64) bool { return x > 18446744073709551614 }
+func ge_18446744073709551614_uint64(x uint64) bool { return x >= 18446744073709551614 }
+func eq_18446744073709551614_uint64(x uint64) bool { return x == 18446744073709551614 }
+func ne_18446744073709551614_uint64(x uint64) bool { return x != 18446744073709551614 }
+func lt_18446744073709551615_uint64(x uint64) bool { return x < 18446744073709551615 }
+func le_18446744073709551615_uint64(x uint64) bool { return x <= 18446744073709551615 }
+func gt_18446744073709551615_uint64(x uint64) bool { return x > 18446744073709551615 }
+func ge_18446744073709551615_uint64(x uint64) bool { return x >= 18446744073709551615 }
+func eq_18446744073709551615_uint64(x uint64) bool { return x == 18446744073709551615 }
+func ne_18446744073709551615_uint64(x uint64) bool { return x != 18446744073709551615 }
+
+var uint64_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(uint64) bool
+}{
+ {idx: 0, exp: lt, fn: lt_0_uint64},
+ {idx: 0, exp: le, fn: le_0_uint64},
+ {idx: 0, exp: gt, fn: gt_0_uint64},
+ {idx: 0, exp: ge, fn: ge_0_uint64},
+ {idx: 0, exp: eq, fn: eq_0_uint64},
+ {idx: 0, exp: ne, fn: ne_0_uint64},
+ {idx: 1, exp: lt, fn: lt_1_uint64},
+ {idx: 1, exp: le, fn: le_1_uint64},
+ {idx: 1, exp: gt, fn: gt_1_uint64},
+ {idx: 1, exp: ge, fn: ge_1_uint64},
+ {idx: 1, exp: eq, fn: eq_1_uint64},
+ {idx: 1, exp: ne, fn: ne_1_uint64},
+ {idx: 2, exp: lt, fn: lt_126_uint64},
+ {idx: 2, exp: le, fn: le_126_uint64},
+ {idx: 2, exp: gt, fn: gt_126_uint64},
+ {idx: 2, exp: ge, fn: ge_126_uint64},
+ {idx: 2, exp: eq, fn: eq_126_uint64},
+ {idx: 2, exp: ne, fn: ne_126_uint64},
+ {idx: 3, exp: lt, fn: lt_127_uint64},
+ {idx: 3, exp: le, fn: le_127_uint64},
+ {idx: 3, exp: gt, fn: gt_127_uint64},
+ {idx: 3, exp: ge, fn: ge_127_uint64},
+ {idx: 3, exp: eq, fn: eq_127_uint64},
+ {idx: 3, exp: ne, fn: ne_127_uint64},
+ {idx: 4, exp: lt, fn: lt_128_uint64},
+ {idx: 4, exp: le, fn: le_128_uint64},
+ {idx: 4, exp: gt, fn: gt_128_uint64},
+ {idx: 4, exp: ge, fn: ge_128_uint64},
+ {idx: 4, exp: eq, fn: eq_128_uint64},
+ {idx: 4, exp: ne, fn: ne_128_uint64},
+ {idx: 5, exp: lt, fn: lt_254_uint64},
+ {idx: 5, exp: le, fn: le_254_uint64},
+ {idx: 5, exp: gt, fn: gt_254_uint64},
+ {idx: 5, exp: ge, fn: ge_254_uint64},
+ {idx: 5, exp: eq, fn: eq_254_uint64},
+ {idx: 5, exp: ne, fn: ne_254_uint64},
+ {idx: 6, exp: lt, fn: lt_255_uint64},
+ {idx: 6, exp: le, fn: le_255_uint64},
+ {idx: 6, exp: gt, fn: gt_255_uint64},
+ {idx: 6, exp: ge, fn: ge_255_uint64},
+ {idx: 6, exp: eq, fn: eq_255_uint64},
+ {idx: 6, exp: ne, fn: ne_255_uint64},
+ {idx: 7, exp: lt, fn: lt_256_uint64},
+ {idx: 7, exp: le, fn: le_256_uint64},
+ {idx: 7, exp: gt, fn: gt_256_uint64},
+ {idx: 7, exp: ge, fn: ge_256_uint64},
+ {idx: 7, exp: eq, fn: eq_256_uint64},
+ {idx: 7, exp: ne, fn: ne_256_uint64},
+ {idx: 8, exp: lt, fn: lt_32766_uint64},
+ {idx: 8, exp: le, fn: le_32766_uint64},
+ {idx: 8, exp: gt, fn: gt_32766_uint64},
+ {idx: 8, exp: ge, fn: ge_32766_uint64},
+ {idx: 8, exp: eq, fn: eq_32766_uint64},
+ {idx: 8, exp: ne, fn: ne_32766_uint64},
+ {idx: 9, exp: lt, fn: lt_32767_uint64},
+ {idx: 9, exp: le, fn: le_32767_uint64},
+ {idx: 9, exp: gt, fn: gt_32767_uint64},
+ {idx: 9, exp: ge, fn: ge_32767_uint64},
+ {idx: 9, exp: eq, fn: eq_32767_uint64},
+ {idx: 9, exp: ne, fn: ne_32767_uint64},
+ {idx: 10, exp: lt, fn: lt_32768_uint64},
+ {idx: 10, exp: le, fn: le_32768_uint64},
+ {idx: 10, exp: gt, fn: gt_32768_uint64},
+ {idx: 10, exp: ge, fn: ge_32768_uint64},
+ {idx: 10, exp: eq, fn: eq_32768_uint64},
+ {idx: 10, exp: ne, fn: ne_32768_uint64},
+ {idx: 11, exp: lt, fn: lt_65534_uint64},
+ {idx: 11, exp: le, fn: le_65534_uint64},
+ {idx: 11, exp: gt, fn: gt_65534_uint64},
+ {idx: 11, exp: ge, fn: ge_65534_uint64},
+ {idx: 11, exp: eq, fn: eq_65534_uint64},
+ {idx: 11, exp: ne, fn: ne_65534_uint64},
+ {idx: 12, exp: lt, fn: lt_65535_uint64},
+ {idx: 12, exp: le, fn: le_65535_uint64},
+ {idx: 12, exp: gt, fn: gt_65535_uint64},
+ {idx: 12, exp: ge, fn: ge_65535_uint64},
+ {idx: 12, exp: eq, fn: eq_65535_uint64},
+ {idx: 12, exp: ne, fn: ne_65535_uint64},
+ {idx: 13, exp: lt, fn: lt_65536_uint64},
+ {idx: 13, exp: le, fn: le_65536_uint64},
+ {idx: 13, exp: gt, fn: gt_65536_uint64},
+ {idx: 13, exp: ge, fn: ge_65536_uint64},
+ {idx: 13, exp: eq, fn: eq_65536_uint64},
+ {idx: 13, exp: ne, fn: ne_65536_uint64},
+ {idx: 14, exp: lt, fn: lt_2147483646_uint64},
+ {idx: 14, exp: le, fn: le_2147483646_uint64},
+ {idx: 14, exp: gt, fn: gt_2147483646_uint64},
+ {idx: 14, exp: ge, fn: ge_2147483646_uint64},
+ {idx: 14, exp: eq, fn: eq_2147483646_uint64},
+ {idx: 14, exp: ne, fn: ne_2147483646_uint64},
+ {idx: 15, exp: lt, fn: lt_2147483647_uint64},
+ {idx: 15, exp: le, fn: le_2147483647_uint64},
+ {idx: 15, exp: gt, fn: gt_2147483647_uint64},
+ {idx: 15, exp: ge, fn: ge_2147483647_uint64},
+ {idx: 15, exp: eq, fn: eq_2147483647_uint64},
+ {idx: 15, exp: ne, fn: ne_2147483647_uint64},
+ {idx: 16, exp: lt, fn: lt_2147483648_uint64},
+ {idx: 16, exp: le, fn: le_2147483648_uint64},
+ {idx: 16, exp: gt, fn: gt_2147483648_uint64},
+ {idx: 16, exp: ge, fn: ge_2147483648_uint64},
+ {idx: 16, exp: eq, fn: eq_2147483648_uint64},
+ {idx: 16, exp: ne, fn: ne_2147483648_uint64},
+ {idx: 17, exp: lt, fn: lt_4278190080_uint64},
+ {idx: 17, exp: le, fn: le_4278190080_uint64},
+ {idx: 17, exp: gt, fn: gt_4278190080_uint64},
+ {idx: 17, exp: ge, fn: ge_4278190080_uint64},
+ {idx: 17, exp: eq, fn: eq_4278190080_uint64},
+ {idx: 17, exp: ne, fn: ne_4278190080_uint64},
+ {idx: 18, exp: lt, fn: lt_4294967294_uint64},
+ {idx: 18, exp: le, fn: le_4294967294_uint64},
+ {idx: 18, exp: gt, fn: gt_4294967294_uint64},
+ {idx: 18, exp: ge, fn: ge_4294967294_uint64},
+ {idx: 18, exp: eq, fn: eq_4294967294_uint64},
+ {idx: 18, exp: ne, fn: ne_4294967294_uint64},
+ {idx: 19, exp: lt, fn: lt_4294967295_uint64},
+ {idx: 19, exp: le, fn: le_4294967295_uint64},
+ {idx: 19, exp: gt, fn: gt_4294967295_uint64},
+ {idx: 19, exp: ge, fn: ge_4294967295_uint64},
+ {idx: 19, exp: eq, fn: eq_4294967295_uint64},
+ {idx: 19, exp: ne, fn: ne_4294967295_uint64},
+ {idx: 20, exp: lt, fn: lt_4294967296_uint64},
+ {idx: 20, exp: le, fn: le_4294967296_uint64},
+ {idx: 20, exp: gt, fn: gt_4294967296_uint64},
+ {idx: 20, exp: ge, fn: ge_4294967296_uint64},
+ {idx: 20, exp: eq, fn: eq_4294967296_uint64},
+ {idx: 20, exp: ne, fn: ne_4294967296_uint64},
+ {idx: 21, exp: lt, fn: lt_1095216660480_uint64},
+ {idx: 21, exp: le, fn: le_1095216660480_uint64},
+ {idx: 21, exp: gt, fn: gt_1095216660480_uint64},
+ {idx: 21, exp: ge, fn: ge_1095216660480_uint64},
+ {idx: 21, exp: eq, fn: eq_1095216660480_uint64},
+ {idx: 21, exp: ne, fn: ne_1095216660480_uint64},
+ {idx: 22, exp: lt, fn: lt_9223372036854775806_uint64},
+ {idx: 22, exp: le, fn: le_9223372036854775806_uint64},
+ {idx: 22, exp: gt, fn: gt_9223372036854775806_uint64},
+ {idx: 22, exp: ge, fn: ge_9223372036854775806_uint64},
+ {idx: 22, exp: eq, fn: eq_9223372036854775806_uint64},
+ {idx: 22, exp: ne, fn: ne_9223372036854775806_uint64},
+ {idx: 23, exp: lt, fn: lt_9223372036854775807_uint64},
+ {idx: 23, exp: le, fn: le_9223372036854775807_uint64},
+ {idx: 23, exp: gt, fn: gt_9223372036854775807_uint64},
+ {idx: 23, exp: ge, fn: ge_9223372036854775807_uint64},
+ {idx: 23, exp: eq, fn: eq_9223372036854775807_uint64},
+ {idx: 23, exp: ne, fn: ne_9223372036854775807_uint64},
+ {idx: 24, exp: lt, fn: lt_9223372036854775808_uint64},
+ {idx: 24, exp: le, fn: le_9223372036854775808_uint64},
+ {idx: 24, exp: gt, fn: gt_9223372036854775808_uint64},
+ {idx: 24, exp: ge, fn: ge_9223372036854775808_uint64},
+ {idx: 24, exp: eq, fn: eq_9223372036854775808_uint64},
+ {idx: 24, exp: ne, fn: ne_9223372036854775808_uint64},
+ {idx: 25, exp: lt, fn: lt_18374686479671623680_uint64},
+ {idx: 25, exp: le, fn: le_18374686479671623680_uint64},
+ {idx: 25, exp: gt, fn: gt_18374686479671623680_uint64},
+ {idx: 25, exp: ge, fn: ge_18374686479671623680_uint64},
+ {idx: 25, exp: eq, fn: eq_18374686479671623680_uint64},
+ {idx: 25, exp: ne, fn: ne_18374686479671623680_uint64},
+ {idx: 26, exp: lt, fn: lt_18446744073709551614_uint64},
+ {idx: 26, exp: le, fn: le_18446744073709551614_uint64},
+ {idx: 26, exp: gt, fn: gt_18446744073709551614_uint64},
+ {idx: 26, exp: ge, fn: ge_18446744073709551614_uint64},
+ {idx: 26, exp: eq, fn: eq_18446744073709551614_uint64},
+ {idx: 26, exp: ne, fn: ne_18446744073709551614_uint64},
+ {idx: 27, exp: lt, fn: lt_18446744073709551615_uint64},
+ {idx: 27, exp: le, fn: le_18446744073709551615_uint64},
+ {idx: 27, exp: gt, fn: gt_18446744073709551615_uint64},
+ {idx: 27, exp: ge, fn: ge_18446744073709551615_uint64},
+ {idx: 27, exp: eq, fn: eq_18446744073709551615_uint64},
+ {idx: 27, exp: ne, fn: ne_18446744073709551615_uint64},
+}
+
+// uint32 tests
+var uint32_vals = []uint32{
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+ 32768,
+ 65534,
+ 65535,
+ 65536,
+ 2147483646,
+ 2147483647,
+ 2147483648,
+ 4278190080,
+ 4294967294,
+ 4294967295,
+}
+
+func lt_0_uint32(x uint32) bool { return x < 0 }
+func le_0_uint32(x uint32) bool { return x <= 0 }
+func gt_0_uint32(x uint32) bool { return x > 0 }
+func ge_0_uint32(x uint32) bool { return x >= 0 }
+func eq_0_uint32(x uint32) bool { return x == 0 }
+func ne_0_uint32(x uint32) bool { return x != 0 }
+func lt_1_uint32(x uint32) bool { return x < 1 }
+func le_1_uint32(x uint32) bool { return x <= 1 }
+func gt_1_uint32(x uint32) bool { return x > 1 }
+func ge_1_uint32(x uint32) bool { return x >= 1 }
+func eq_1_uint32(x uint32) bool { return x == 1 }
+func ne_1_uint32(x uint32) bool { return x != 1 }
+func lt_126_uint32(x uint32) bool { return x < 126 }
+func le_126_uint32(x uint32) bool { return x <= 126 }
+func gt_126_uint32(x uint32) bool { return x > 126 }
+func ge_126_uint32(x uint32) bool { return x >= 126 }
+func eq_126_uint32(x uint32) bool { return x == 126 }
+func ne_126_uint32(x uint32) bool { return x != 126 }
+func lt_127_uint32(x uint32) bool { return x < 127 }
+func le_127_uint32(x uint32) bool { return x <= 127 }
+func gt_127_uint32(x uint32) bool { return x > 127 }
+func ge_127_uint32(x uint32) bool { return x >= 127 }
+func eq_127_uint32(x uint32) bool { return x == 127 }
+func ne_127_uint32(x uint32) bool { return x != 127 }
+func lt_128_uint32(x uint32) bool { return x < 128 }
+func le_128_uint32(x uint32) bool { return x <= 128 }
+func gt_128_uint32(x uint32) bool { return x > 128 }
+func ge_128_uint32(x uint32) bool { return x >= 128 }
+func eq_128_uint32(x uint32) bool { return x == 128 }
+func ne_128_uint32(x uint32) bool { return x != 128 }
+func lt_254_uint32(x uint32) bool { return x < 254 }
+func le_254_uint32(x uint32) bool { return x <= 254 }
+func gt_254_uint32(x uint32) bool { return x > 254 }
+func ge_254_uint32(x uint32) bool { return x >= 254 }
+func eq_254_uint32(x uint32) bool { return x == 254 }
+func ne_254_uint32(x uint32) bool { return x != 254 }
+func lt_255_uint32(x uint32) bool { return x < 255 }
+func le_255_uint32(x uint32) bool { return x <= 255 }
+func gt_255_uint32(x uint32) bool { return x > 255 }
+func ge_255_uint32(x uint32) bool { return x >= 255 }
+func eq_255_uint32(x uint32) bool { return x == 255 }
+func ne_255_uint32(x uint32) bool { return x != 255 }
+func lt_256_uint32(x uint32) bool { return x < 256 }
+func le_256_uint32(x uint32) bool { return x <= 256 }
+func gt_256_uint32(x uint32) bool { return x > 256 }
+func ge_256_uint32(x uint32) bool { return x >= 256 }
+func eq_256_uint32(x uint32) bool { return x == 256 }
+func ne_256_uint32(x uint32) bool { return x != 256 }
+func lt_32766_uint32(x uint32) bool { return x < 32766 }
+func le_32766_uint32(x uint32) bool { return x <= 32766 }
+func gt_32766_uint32(x uint32) bool { return x > 32766 }
+func ge_32766_uint32(x uint32) bool { return x >= 32766 }
+func eq_32766_uint32(x uint32) bool { return x == 32766 }
+func ne_32766_uint32(x uint32) bool { return x != 32766 }
+func lt_32767_uint32(x uint32) bool { return x < 32767 }
+func le_32767_uint32(x uint32) bool { return x <= 32767 }
+func gt_32767_uint32(x uint32) bool { return x > 32767 }
+func ge_32767_uint32(x uint32) bool { return x >= 32767 }
+func eq_32767_uint32(x uint32) bool { return x == 32767 }
+func ne_32767_uint32(x uint32) bool { return x != 32767 }
+func lt_32768_uint32(x uint32) bool { return x < 32768 }
+func le_32768_uint32(x uint32) bool { return x <= 32768 }
+func gt_32768_uint32(x uint32) bool { return x > 32768 }
+func ge_32768_uint32(x uint32) bool { return x >= 32768 }
+func eq_32768_uint32(x uint32) bool { return x == 32768 }
+func ne_32768_uint32(x uint32) bool { return x != 32768 }
+func lt_65534_uint32(x uint32) bool { return x < 65534 }
+func le_65534_uint32(x uint32) bool { return x <= 65534 }
+func gt_65534_uint32(x uint32) bool { return x > 65534 }
+func ge_65534_uint32(x uint32) bool { return x >= 65534 }
+func eq_65534_uint32(x uint32) bool { return x == 65534 }
+func ne_65534_uint32(x uint32) bool { return x != 65534 }
+func lt_65535_uint32(x uint32) bool { return x < 65535 }
+func le_65535_uint32(x uint32) bool { return x <= 65535 }
+func gt_65535_uint32(x uint32) bool { return x > 65535 }
+func ge_65535_uint32(x uint32) bool { return x >= 65535 }
+func eq_65535_uint32(x uint32) bool { return x == 65535 }
+func ne_65535_uint32(x uint32) bool { return x != 65535 }
+func lt_65536_uint32(x uint32) bool { return x < 65536 }
+func le_65536_uint32(x uint32) bool { return x <= 65536 }
+func gt_65536_uint32(x uint32) bool { return x > 65536 }
+func ge_65536_uint32(x uint32) bool { return x >= 65536 }
+func eq_65536_uint32(x uint32) bool { return x == 65536 }
+func ne_65536_uint32(x uint32) bool { return x != 65536 }
+func lt_2147483646_uint32(x uint32) bool { return x < 2147483646 }
+func le_2147483646_uint32(x uint32) bool { return x <= 2147483646 }
+func gt_2147483646_uint32(x uint32) bool { return x > 2147483646 }
+func ge_2147483646_uint32(x uint32) bool { return x >= 2147483646 }
+func eq_2147483646_uint32(x uint32) bool { return x == 2147483646 }
+func ne_2147483646_uint32(x uint32) bool { return x != 2147483646 }
+func lt_2147483647_uint32(x uint32) bool { return x < 2147483647 }
+func le_2147483647_uint32(x uint32) bool { return x <= 2147483647 }
+func gt_2147483647_uint32(x uint32) bool { return x > 2147483647 }
+func ge_2147483647_uint32(x uint32) bool { return x >= 2147483647 }
+func eq_2147483647_uint32(x uint32) bool { return x == 2147483647 }
+func ne_2147483647_uint32(x uint32) bool { return x != 2147483647 }
+func lt_2147483648_uint32(x uint32) bool { return x < 2147483648 }
+func le_2147483648_uint32(x uint32) bool { return x <= 2147483648 }
+func gt_2147483648_uint32(x uint32) bool { return x > 2147483648 }
+func ge_2147483648_uint32(x uint32) bool { return x >= 2147483648 }
+func eq_2147483648_uint32(x uint32) bool { return x == 2147483648 }
+func ne_2147483648_uint32(x uint32) bool { return x != 2147483648 }
+func lt_4278190080_uint32(x uint32) bool { return x < 4278190080 }
+func le_4278190080_uint32(x uint32) bool { return x <= 4278190080 }
+func gt_4278190080_uint32(x uint32) bool { return x > 4278190080 }
+func ge_4278190080_uint32(x uint32) bool { return x >= 4278190080 }
+func eq_4278190080_uint32(x uint32) bool { return x == 4278190080 }
+func ne_4278190080_uint32(x uint32) bool { return x != 4278190080 }
+func lt_4294967294_uint32(x uint32) bool { return x < 4294967294 }
+func le_4294967294_uint32(x uint32) bool { return x <= 4294967294 }
+func gt_4294967294_uint32(x uint32) bool { return x > 4294967294 }
+func ge_4294967294_uint32(x uint32) bool { return x >= 4294967294 }
+func eq_4294967294_uint32(x uint32) bool { return x == 4294967294 }
+func ne_4294967294_uint32(x uint32) bool { return x != 4294967294 }
+func lt_4294967295_uint32(x uint32) bool { return x < 4294967295 }
+func le_4294967295_uint32(x uint32) bool { return x <= 4294967295 }
+func gt_4294967295_uint32(x uint32) bool { return x > 4294967295 }
+func ge_4294967295_uint32(x uint32) bool { return x >= 4294967295 }
+func eq_4294967295_uint32(x uint32) bool { return x == 4294967295 }
+func ne_4294967295_uint32(x uint32) bool { return x != 4294967295 }
+
+var uint32_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(uint32) bool
+}{
+ {idx: 0, exp: lt, fn: lt_0_uint32},
+ {idx: 0, exp: le, fn: le_0_uint32},
+ {idx: 0, exp: gt, fn: gt_0_uint32},
+ {idx: 0, exp: ge, fn: ge_0_uint32},
+ {idx: 0, exp: eq, fn: eq_0_uint32},
+ {idx: 0, exp: ne, fn: ne_0_uint32},
+ {idx: 1, exp: lt, fn: lt_1_uint32},
+ {idx: 1, exp: le, fn: le_1_uint32},
+ {idx: 1, exp: gt, fn: gt_1_uint32},
+ {idx: 1, exp: ge, fn: ge_1_uint32},
+ {idx: 1, exp: eq, fn: eq_1_uint32},
+ {idx: 1, exp: ne, fn: ne_1_uint32},
+ {idx: 2, exp: lt, fn: lt_126_uint32},
+ {idx: 2, exp: le, fn: le_126_uint32},
+ {idx: 2, exp: gt, fn: gt_126_uint32},
+ {idx: 2, exp: ge, fn: ge_126_uint32},
+ {idx: 2, exp: eq, fn: eq_126_uint32},
+ {idx: 2, exp: ne, fn: ne_126_uint32},
+ {idx: 3, exp: lt, fn: lt_127_uint32},
+ {idx: 3, exp: le, fn: le_127_uint32},
+ {idx: 3, exp: gt, fn: gt_127_uint32},
+ {idx: 3, exp: ge, fn: ge_127_uint32},
+ {idx: 3, exp: eq, fn: eq_127_uint32},
+ {idx: 3, exp: ne, fn: ne_127_uint32},
+ {idx: 4, exp: lt, fn: lt_128_uint32},
+ {idx: 4, exp: le, fn: le_128_uint32},
+ {idx: 4, exp: gt, fn: gt_128_uint32},
+ {idx: 4, exp: ge, fn: ge_128_uint32},
+ {idx: 4, exp: eq, fn: eq_128_uint32},
+ {idx: 4, exp: ne, fn: ne_128_uint32},
+ {idx: 5, exp: lt, fn: lt_254_uint32},
+ {idx: 5, exp: le, fn: le_254_uint32},
+ {idx: 5, exp: gt, fn: gt_254_uint32},
+ {idx: 5, exp: ge, fn: ge_254_uint32},
+ {idx: 5, exp: eq, fn: eq_254_uint32},
+ {idx: 5, exp: ne, fn: ne_254_uint32},
+ {idx: 6, exp: lt, fn: lt_255_uint32},
+ {idx: 6, exp: le, fn: le_255_uint32},
+ {idx: 6, exp: gt, fn: gt_255_uint32},
+ {idx: 6, exp: ge, fn: ge_255_uint32},
+ {idx: 6, exp: eq, fn: eq_255_uint32},
+ {idx: 6, exp: ne, fn: ne_255_uint32},
+ {idx: 7, exp: lt, fn: lt_256_uint32},
+ {idx: 7, exp: le, fn: le_256_uint32},
+ {idx: 7, exp: gt, fn: gt_256_uint32},
+ {idx: 7, exp: ge, fn: ge_256_uint32},
+ {idx: 7, exp: eq, fn: eq_256_uint32},
+ {idx: 7, exp: ne, fn: ne_256_uint32},
+ {idx: 8, exp: lt, fn: lt_32766_uint32},
+ {idx: 8, exp: le, fn: le_32766_uint32},
+ {idx: 8, exp: gt, fn: gt_32766_uint32},
+ {idx: 8, exp: ge, fn: ge_32766_uint32},
+ {idx: 8, exp: eq, fn: eq_32766_uint32},
+ {idx: 8, exp: ne, fn: ne_32766_uint32},
+ {idx: 9, exp: lt, fn: lt_32767_uint32},
+ {idx: 9, exp: le, fn: le_32767_uint32},
+ {idx: 9, exp: gt, fn: gt_32767_uint32},
+ {idx: 9, exp: ge, fn: ge_32767_uint32},
+ {idx: 9, exp: eq, fn: eq_32767_uint32},
+ {idx: 9, exp: ne, fn: ne_32767_uint32},
+ {idx: 10, exp: lt, fn: lt_32768_uint32},
+ {idx: 10, exp: le, fn: le_32768_uint32},
+ {idx: 10, exp: gt, fn: gt_32768_uint32},
+ {idx: 10, exp: ge, fn: ge_32768_uint32},
+ {idx: 10, exp: eq, fn: eq_32768_uint32},
+ {idx: 10, exp: ne, fn: ne_32768_uint32},
+ {idx: 11, exp: lt, fn: lt_65534_uint32},
+ {idx: 11, exp: le, fn: le_65534_uint32},
+ {idx: 11, exp: gt, fn: gt_65534_uint32},
+ {idx: 11, exp: ge, fn: ge_65534_uint32},
+ {idx: 11, exp: eq, fn: eq_65534_uint32},
+ {idx: 11, exp: ne, fn: ne_65534_uint32},
+ {idx: 12, exp: lt, fn: lt_65535_uint32},
+ {idx: 12, exp: le, fn: le_65535_uint32},
+ {idx: 12, exp: gt, fn: gt_65535_uint32},
+ {idx: 12, exp: ge, fn: ge_65535_uint32},
+ {idx: 12, exp: eq, fn: eq_65535_uint32},
+ {idx: 12, exp: ne, fn: ne_65535_uint32},
+ {idx: 13, exp: lt, fn: lt_65536_uint32},
+ {idx: 13, exp: le, fn: le_65536_uint32},
+ {idx: 13, exp: gt, fn: gt_65536_uint32},
+ {idx: 13, exp: ge, fn: ge_65536_uint32},
+ {idx: 13, exp: eq, fn: eq_65536_uint32},
+ {idx: 13, exp: ne, fn: ne_65536_uint32},
+ {idx: 14, exp: lt, fn: lt_2147483646_uint32},
+ {idx: 14, exp: le, fn: le_2147483646_uint32},
+ {idx: 14, exp: gt, fn: gt_2147483646_uint32},
+ {idx: 14, exp: ge, fn: ge_2147483646_uint32},
+ {idx: 14, exp: eq, fn: eq_2147483646_uint32},
+ {idx: 14, exp: ne, fn: ne_2147483646_uint32},
+ {idx: 15, exp: lt, fn: lt_2147483647_uint32},
+ {idx: 15, exp: le, fn: le_2147483647_uint32},
+ {idx: 15, exp: gt, fn: gt_2147483647_uint32},
+ {idx: 15, exp: ge, fn: ge_2147483647_uint32},
+ {idx: 15, exp: eq, fn: eq_2147483647_uint32},
+ {idx: 15, exp: ne, fn: ne_2147483647_uint32},
+ {idx: 16, exp: lt, fn: lt_2147483648_uint32},
+ {idx: 16, exp: le, fn: le_2147483648_uint32},
+ {idx: 16, exp: gt, fn: gt_2147483648_uint32},
+ {idx: 16, exp: ge, fn: ge_2147483648_uint32},
+ {idx: 16, exp: eq, fn: eq_2147483648_uint32},
+ {idx: 16, exp: ne, fn: ne_2147483648_uint32},
+ {idx: 17, exp: lt, fn: lt_4278190080_uint32},
+ {idx: 17, exp: le, fn: le_4278190080_uint32},
+ {idx: 17, exp: gt, fn: gt_4278190080_uint32},
+ {idx: 17, exp: ge, fn: ge_4278190080_uint32},
+ {idx: 17, exp: eq, fn: eq_4278190080_uint32},
+ {idx: 17, exp: ne, fn: ne_4278190080_uint32},
+ {idx: 18, exp: lt, fn: lt_4294967294_uint32},
+ {idx: 18, exp: le, fn: le_4294967294_uint32},
+ {idx: 18, exp: gt, fn: gt_4294967294_uint32},
+ {idx: 18, exp: ge, fn: ge_4294967294_uint32},
+ {idx: 18, exp: eq, fn: eq_4294967294_uint32},
+ {idx: 18, exp: ne, fn: ne_4294967294_uint32},
+ {idx: 19, exp: lt, fn: lt_4294967295_uint32},
+ {idx: 19, exp: le, fn: le_4294967295_uint32},
+ {idx: 19, exp: gt, fn: gt_4294967295_uint32},
+ {idx: 19, exp: ge, fn: ge_4294967295_uint32},
+ {idx: 19, exp: eq, fn: eq_4294967295_uint32},
+ {idx: 19, exp: ne, fn: ne_4294967295_uint32},
+}
+
+// uint16 tests
+var uint16_vals = []uint16{
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+ 32768,
+ 65534,
+ 65535,
+}
+
+func lt_0_uint16(x uint16) bool { return x < 0 }
+func le_0_uint16(x uint16) bool { return x <= 0 }
+func gt_0_uint16(x uint16) bool { return x > 0 }
+func ge_0_uint16(x uint16) bool { return x >= 0 }
+func eq_0_uint16(x uint16) bool { return x == 0 }
+func ne_0_uint16(x uint16) bool { return x != 0 }
+func lt_1_uint16(x uint16) bool { return x < 1 }
+func le_1_uint16(x uint16) bool { return x <= 1 }
+func gt_1_uint16(x uint16) bool { return x > 1 }
+func ge_1_uint16(x uint16) bool { return x >= 1 }
+func eq_1_uint16(x uint16) bool { return x == 1 }
+func ne_1_uint16(x uint16) bool { return x != 1 }
+func lt_126_uint16(x uint16) bool { return x < 126 }
+func le_126_uint16(x uint16) bool { return x <= 126 }
+func gt_126_uint16(x uint16) bool { return x > 126 }
+func ge_126_uint16(x uint16) bool { return x >= 126 }
+func eq_126_uint16(x uint16) bool { return x == 126 }
+func ne_126_uint16(x uint16) bool { return x != 126 }
+func lt_127_uint16(x uint16) bool { return x < 127 }
+func le_127_uint16(x uint16) bool { return x <= 127 }
+func gt_127_uint16(x uint16) bool { return x > 127 }
+func ge_127_uint16(x uint16) bool { return x >= 127 }
+func eq_127_uint16(x uint16) bool { return x == 127 }
+func ne_127_uint16(x uint16) bool { return x != 127 }
+func lt_128_uint16(x uint16) bool { return x < 128 }
+func le_128_uint16(x uint16) bool { return x <= 128 }
+func gt_128_uint16(x uint16) bool { return x > 128 }
+func ge_128_uint16(x uint16) bool { return x >= 128 }
+func eq_128_uint16(x uint16) bool { return x == 128 }
+func ne_128_uint16(x uint16) bool { return x != 128 }
+func lt_254_uint16(x uint16) bool { return x < 254 }
+func le_254_uint16(x uint16) bool { return x <= 254 }
+func gt_254_uint16(x uint16) bool { return x > 254 }
+func ge_254_uint16(x uint16) bool { return x >= 254 }
+func eq_254_uint16(x uint16) bool { return x == 254 }
+func ne_254_uint16(x uint16) bool { return x != 254 }
+func lt_255_uint16(x uint16) bool { return x < 255 }
+func le_255_uint16(x uint16) bool { return x <= 255 }
+func gt_255_uint16(x uint16) bool { return x > 255 }
+func ge_255_uint16(x uint16) bool { return x >= 255 }
+func eq_255_uint16(x uint16) bool { return x == 255 }
+func ne_255_uint16(x uint16) bool { return x != 255 }
+func lt_256_uint16(x uint16) bool { return x < 256 }
+func le_256_uint16(x uint16) bool { return x <= 256 }
+func gt_256_uint16(x uint16) bool { return x > 256 }
+func ge_256_uint16(x uint16) bool { return x >= 256 }
+func eq_256_uint16(x uint16) bool { return x == 256 }
+func ne_256_uint16(x uint16) bool { return x != 256 }
+func lt_32766_uint16(x uint16) bool { return x < 32766 }
+func le_32766_uint16(x uint16) bool { return x <= 32766 }
+func gt_32766_uint16(x uint16) bool { return x > 32766 }
+func ge_32766_uint16(x uint16) bool { return x >= 32766 }
+func eq_32766_uint16(x uint16) bool { return x == 32766 }
+func ne_32766_uint16(x uint16) bool { return x != 32766 }
+func lt_32767_uint16(x uint16) bool { return x < 32767 }
+func le_32767_uint16(x uint16) bool { return x <= 32767 }
+func gt_32767_uint16(x uint16) bool { return x > 32767 }
+func ge_32767_uint16(x uint16) bool { return x >= 32767 }
+func eq_32767_uint16(x uint16) bool { return x == 32767 }
+func ne_32767_uint16(x uint16) bool { return x != 32767 }
+func lt_32768_uint16(x uint16) bool { return x < 32768 }
+func le_32768_uint16(x uint16) bool { return x <= 32768 }
+func gt_32768_uint16(x uint16) bool { return x > 32768 }
+func ge_32768_uint16(x uint16) bool { return x >= 32768 }
+func eq_32768_uint16(x uint16) bool { return x == 32768 }
+func ne_32768_uint16(x uint16) bool { return x != 32768 }
+func lt_65534_uint16(x uint16) bool { return x < 65534 }
+func le_65534_uint16(x uint16) bool { return x <= 65534 }
+func gt_65534_uint16(x uint16) bool { return x > 65534 }
+func ge_65534_uint16(x uint16) bool { return x >= 65534 }
+func eq_65534_uint16(x uint16) bool { return x == 65534 }
+func ne_65534_uint16(x uint16) bool { return x != 65534 }
+func lt_65535_uint16(x uint16) bool { return x < 65535 }
+func le_65535_uint16(x uint16) bool { return x <= 65535 }
+func gt_65535_uint16(x uint16) bool { return x > 65535 }
+func ge_65535_uint16(x uint16) bool { return x >= 65535 }
+func eq_65535_uint16(x uint16) bool { return x == 65535 }
+func ne_65535_uint16(x uint16) bool { return x != 65535 }
+
+var uint16_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(uint16) bool
+}{
+ {idx: 0, exp: lt, fn: lt_0_uint16},
+ {idx: 0, exp: le, fn: le_0_uint16},
+ {idx: 0, exp: gt, fn: gt_0_uint16},
+ {idx: 0, exp: ge, fn: ge_0_uint16},
+ {idx: 0, exp: eq, fn: eq_0_uint16},
+ {idx: 0, exp: ne, fn: ne_0_uint16},
+ {idx: 1, exp: lt, fn: lt_1_uint16},
+ {idx: 1, exp: le, fn: le_1_uint16},
+ {idx: 1, exp: gt, fn: gt_1_uint16},
+ {idx: 1, exp: ge, fn: ge_1_uint16},
+ {idx: 1, exp: eq, fn: eq_1_uint16},
+ {idx: 1, exp: ne, fn: ne_1_uint16},
+ {idx: 2, exp: lt, fn: lt_126_uint16},
+ {idx: 2, exp: le, fn: le_126_uint16},
+ {idx: 2, exp: gt, fn: gt_126_uint16},
+ {idx: 2, exp: ge, fn: ge_126_uint16},
+ {idx: 2, exp: eq, fn: eq_126_uint16},
+ {idx: 2, exp: ne, fn: ne_126_uint16},
+ {idx: 3, exp: lt, fn: lt_127_uint16},
+ {idx: 3, exp: le, fn: le_127_uint16},
+ {idx: 3, exp: gt, fn: gt_127_uint16},
+ {idx: 3, exp: ge, fn: ge_127_uint16},
+ {idx: 3, exp: eq, fn: eq_127_uint16},
+ {idx: 3, exp: ne, fn: ne_127_uint16},
+ {idx: 4, exp: lt, fn: lt_128_uint16},
+ {idx: 4, exp: le, fn: le_128_uint16},
+ {idx: 4, exp: gt, fn: gt_128_uint16},
+ {idx: 4, exp: ge, fn: ge_128_uint16},
+ {idx: 4, exp: eq, fn: eq_128_uint16},
+ {idx: 4, exp: ne, fn: ne_128_uint16},
+ {idx: 5, exp: lt, fn: lt_254_uint16},
+ {idx: 5, exp: le, fn: le_254_uint16},
+ {idx: 5, exp: gt, fn: gt_254_uint16},
+ {idx: 5, exp: ge, fn: ge_254_uint16},
+ {idx: 5, exp: eq, fn: eq_254_uint16},
+ {idx: 5, exp: ne, fn: ne_254_uint16},
+ {idx: 6, exp: lt, fn: lt_255_uint16},
+ {idx: 6, exp: le, fn: le_255_uint16},
+ {idx: 6, exp: gt, fn: gt_255_uint16},
+ {idx: 6, exp: ge, fn: ge_255_uint16},
+ {idx: 6, exp: eq, fn: eq_255_uint16},
+ {idx: 6, exp: ne, fn: ne_255_uint16},
+ {idx: 7, exp: lt, fn: lt_256_uint16},
+ {idx: 7, exp: le, fn: le_256_uint16},
+ {idx: 7, exp: gt, fn: gt_256_uint16},
+ {idx: 7, exp: ge, fn: ge_256_uint16},
+ {idx: 7, exp: eq, fn: eq_256_uint16},
+ {idx: 7, exp: ne, fn: ne_256_uint16},
+ {idx: 8, exp: lt, fn: lt_32766_uint16},
+ {idx: 8, exp: le, fn: le_32766_uint16},
+ {idx: 8, exp: gt, fn: gt_32766_uint16},
+ {idx: 8, exp: ge, fn: ge_32766_uint16},
+ {idx: 8, exp: eq, fn: eq_32766_uint16},
+ {idx: 8, exp: ne, fn: ne_32766_uint16},
+ {idx: 9, exp: lt, fn: lt_32767_uint16},
+ {idx: 9, exp: le, fn: le_32767_uint16},
+ {idx: 9, exp: gt, fn: gt_32767_uint16},
+ {idx: 9, exp: ge, fn: ge_32767_uint16},
+ {idx: 9, exp: eq, fn: eq_32767_uint16},
+ {idx: 9, exp: ne, fn: ne_32767_uint16},
+ {idx: 10, exp: lt, fn: lt_32768_uint16},
+ {idx: 10, exp: le, fn: le_32768_uint16},
+ {idx: 10, exp: gt, fn: gt_32768_uint16},
+ {idx: 10, exp: ge, fn: ge_32768_uint16},
+ {idx: 10, exp: eq, fn: eq_32768_uint16},
+ {idx: 10, exp: ne, fn: ne_32768_uint16},
+ {idx: 11, exp: lt, fn: lt_65534_uint16},
+ {idx: 11, exp: le, fn: le_65534_uint16},
+ {idx: 11, exp: gt, fn: gt_65534_uint16},
+ {idx: 11, exp: ge, fn: ge_65534_uint16},
+ {idx: 11, exp: eq, fn: eq_65534_uint16},
+ {idx: 11, exp: ne, fn: ne_65534_uint16},
+ {idx: 12, exp: lt, fn: lt_65535_uint16},
+ {idx: 12, exp: le, fn: le_65535_uint16},
+ {idx: 12, exp: gt, fn: gt_65535_uint16},
+ {idx: 12, exp: ge, fn: ge_65535_uint16},
+ {idx: 12, exp: eq, fn: eq_65535_uint16},
+ {idx: 12, exp: ne, fn: ne_65535_uint16},
+}
+
+// uint8 tests
+var uint8_vals = []uint8{
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+}
+
+func lt_0_uint8(x uint8) bool { return x < 0 }
+func le_0_uint8(x uint8) bool { return x <= 0 }
+func gt_0_uint8(x uint8) bool { return x > 0 }
+func ge_0_uint8(x uint8) bool { return x >= 0 }
+func eq_0_uint8(x uint8) bool { return x == 0 }
+func ne_0_uint8(x uint8) bool { return x != 0 }
+func lt_1_uint8(x uint8) bool { return x < 1 }
+func le_1_uint8(x uint8) bool { return x <= 1 }
+func gt_1_uint8(x uint8) bool { return x > 1 }
+func ge_1_uint8(x uint8) bool { return x >= 1 }
+func eq_1_uint8(x uint8) bool { return x == 1 }
+func ne_1_uint8(x uint8) bool { return x != 1 }
+func lt_126_uint8(x uint8) bool { return x < 126 }
+func le_126_uint8(x uint8) bool { return x <= 126 }
+func gt_126_uint8(x uint8) bool { return x > 126 }
+func ge_126_uint8(x uint8) bool { return x >= 126 }
+func eq_126_uint8(x uint8) bool { return x == 126 }
+func ne_126_uint8(x uint8) bool { return x != 126 }
+func lt_127_uint8(x uint8) bool { return x < 127 }
+func le_127_uint8(x uint8) bool { return x <= 127 }
+func gt_127_uint8(x uint8) bool { return x > 127 }
+func ge_127_uint8(x uint8) bool { return x >= 127 }
+func eq_127_uint8(x uint8) bool { return x == 127 }
+func ne_127_uint8(x uint8) bool { return x != 127 }
+func lt_128_uint8(x uint8) bool { return x < 128 }
+func le_128_uint8(x uint8) bool { return x <= 128 }
+func gt_128_uint8(x uint8) bool { return x > 128 }
+func ge_128_uint8(x uint8) bool { return x >= 128 }
+func eq_128_uint8(x uint8) bool { return x == 128 }
+func ne_128_uint8(x uint8) bool { return x != 128 }
+func lt_254_uint8(x uint8) bool { return x < 254 }
+func le_254_uint8(x uint8) bool { return x <= 254 }
+func gt_254_uint8(x uint8) bool { return x > 254 }
+func ge_254_uint8(x uint8) bool { return x >= 254 }
+func eq_254_uint8(x uint8) bool { return x == 254 }
+func ne_254_uint8(x uint8) bool { return x != 254 }
+func lt_255_uint8(x uint8) bool { return x < 255 }
+func le_255_uint8(x uint8) bool { return x <= 255 }
+func gt_255_uint8(x uint8) bool { return x > 255 }
+func ge_255_uint8(x uint8) bool { return x >= 255 }
+func eq_255_uint8(x uint8) bool { return x == 255 }
+func ne_255_uint8(x uint8) bool { return x != 255 }
+
+var uint8_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(uint8) bool
+}{
+ {idx: 0, exp: lt, fn: lt_0_uint8},
+ {idx: 0, exp: le, fn: le_0_uint8},
+ {idx: 0, exp: gt, fn: gt_0_uint8},
+ {idx: 0, exp: ge, fn: ge_0_uint8},
+ {idx: 0, exp: eq, fn: eq_0_uint8},
+ {idx: 0, exp: ne, fn: ne_0_uint8},
+ {idx: 1, exp: lt, fn: lt_1_uint8},
+ {idx: 1, exp: le, fn: le_1_uint8},
+ {idx: 1, exp: gt, fn: gt_1_uint8},
+ {idx: 1, exp: ge, fn: ge_1_uint8},
+ {idx: 1, exp: eq, fn: eq_1_uint8},
+ {idx: 1, exp: ne, fn: ne_1_uint8},
+ {idx: 2, exp: lt, fn: lt_126_uint8},
+ {idx: 2, exp: le, fn: le_126_uint8},
+ {idx: 2, exp: gt, fn: gt_126_uint8},
+ {idx: 2, exp: ge, fn: ge_126_uint8},
+ {idx: 2, exp: eq, fn: eq_126_uint8},
+ {idx: 2, exp: ne, fn: ne_126_uint8},
+ {idx: 3, exp: lt, fn: lt_127_uint8},
+ {idx: 3, exp: le, fn: le_127_uint8},
+ {idx: 3, exp: gt, fn: gt_127_uint8},
+ {idx: 3, exp: ge, fn: ge_127_uint8},
+ {idx: 3, exp: eq, fn: eq_127_uint8},
+ {idx: 3, exp: ne, fn: ne_127_uint8},
+ {idx: 4, exp: lt, fn: lt_128_uint8},
+ {idx: 4, exp: le, fn: le_128_uint8},
+ {idx: 4, exp: gt, fn: gt_128_uint8},
+ {idx: 4, exp: ge, fn: ge_128_uint8},
+ {idx: 4, exp: eq, fn: eq_128_uint8},
+ {idx: 4, exp: ne, fn: ne_128_uint8},
+ {idx: 5, exp: lt, fn: lt_254_uint8},
+ {idx: 5, exp: le, fn: le_254_uint8},
+ {idx: 5, exp: gt, fn: gt_254_uint8},
+ {idx: 5, exp: ge, fn: ge_254_uint8},
+ {idx: 5, exp: eq, fn: eq_254_uint8},
+ {idx: 5, exp: ne, fn: ne_254_uint8},
+ {idx: 6, exp: lt, fn: lt_255_uint8},
+ {idx: 6, exp: le, fn: le_255_uint8},
+ {idx: 6, exp: gt, fn: gt_255_uint8},
+ {idx: 6, exp: ge, fn: ge_255_uint8},
+ {idx: 6, exp: eq, fn: eq_255_uint8},
+ {idx: 6, exp: ne, fn: ne_255_uint8},
+}
+
+// int64 tests
+var int64_vals = []int64{
+ -9223372036854775808,
+ -9223372036854775807,
+ -2147483649,
+ -2147483648,
+ -2147483647,
+ -32769,
+ -32768,
+ -32767,
+ -129,
+ -128,
+ -127,
+ -1,
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+ 32768,
+ 65534,
+ 65535,
+ 65536,
+ 2147483646,
+ 2147483647,
+ 2147483648,
+ 4278190080,
+ 4294967294,
+ 4294967295,
+ 4294967296,
+ 1095216660480,
+ 9223372036854775806,
+ 9223372036854775807,
+}
+
+func lt_neg9223372036854775808_int64(x int64) bool { return x < -9223372036854775808 }
+func le_neg9223372036854775808_int64(x int64) bool { return x <= -9223372036854775808 }
+func gt_neg9223372036854775808_int64(x int64) bool { return x > -9223372036854775808 }
+func ge_neg9223372036854775808_int64(x int64) bool { return x >= -9223372036854775808 }
+func eq_neg9223372036854775808_int64(x int64) bool { return x == -9223372036854775808 }
+func ne_neg9223372036854775808_int64(x int64) bool { return x != -9223372036854775808 }
+func lt_neg9223372036854775807_int64(x int64) bool { return x < -9223372036854775807 }
+func le_neg9223372036854775807_int64(x int64) bool { return x <= -9223372036854775807 }
+func gt_neg9223372036854775807_int64(x int64) bool { return x > -9223372036854775807 }
+func ge_neg9223372036854775807_int64(x int64) bool { return x >= -9223372036854775807 }
+func eq_neg9223372036854775807_int64(x int64) bool { return x == -9223372036854775807 }
+func ne_neg9223372036854775807_int64(x int64) bool { return x != -9223372036854775807 }
+func lt_neg2147483649_int64(x int64) bool { return x < -2147483649 }
+func le_neg2147483649_int64(x int64) bool { return x <= -2147483649 }
+func gt_neg2147483649_int64(x int64) bool { return x > -2147483649 }
+func ge_neg2147483649_int64(x int64) bool { return x >= -2147483649 }
+func eq_neg2147483649_int64(x int64) bool { return x == -2147483649 }
+func ne_neg2147483649_int64(x int64) bool { return x != -2147483649 }
+func lt_neg2147483648_int64(x int64) bool { return x < -2147483648 }
+func le_neg2147483648_int64(x int64) bool { return x <= -2147483648 }
+func gt_neg2147483648_int64(x int64) bool { return x > -2147483648 }
+func ge_neg2147483648_int64(x int64) bool { return x >= -2147483648 }
+func eq_neg2147483648_int64(x int64) bool { return x == -2147483648 }
+func ne_neg2147483648_int64(x int64) bool { return x != -2147483648 }
+func lt_neg2147483647_int64(x int64) bool { return x < -2147483647 }
+func le_neg2147483647_int64(x int64) bool { return x <= -2147483647 }
+func gt_neg2147483647_int64(x int64) bool { return x > -2147483647 }
+func ge_neg2147483647_int64(x int64) bool { return x >= -2147483647 }
+func eq_neg2147483647_int64(x int64) bool { return x == -2147483647 }
+func ne_neg2147483647_int64(x int64) bool { return x != -2147483647 }
+func lt_neg32769_int64(x int64) bool { return x < -32769 }
+func le_neg32769_int64(x int64) bool { return x <= -32769 }
+func gt_neg32769_int64(x int64) bool { return x > -32769 }
+func ge_neg32769_int64(x int64) bool { return x >= -32769 }
+func eq_neg32769_int64(x int64) bool { return x == -32769 }
+func ne_neg32769_int64(x int64) bool { return x != -32769 }
+func lt_neg32768_int64(x int64) bool { return x < -32768 }
+func le_neg32768_int64(x int64) bool { return x <= -32768 }
+func gt_neg32768_int64(x int64) bool { return x > -32768 }
+func ge_neg32768_int64(x int64) bool { return x >= -32768 }
+func eq_neg32768_int64(x int64) bool { return x == -32768 }
+func ne_neg32768_int64(x int64) bool { return x != -32768 }
+func lt_neg32767_int64(x int64) bool { return x < -32767 }
+func le_neg32767_int64(x int64) bool { return x <= -32767 }
+func gt_neg32767_int64(x int64) bool { return x > -32767 }
+func ge_neg32767_int64(x int64) bool { return x >= -32767 }
+func eq_neg32767_int64(x int64) bool { return x == -32767 }
+func ne_neg32767_int64(x int64) bool { return x != -32767 }
+func lt_neg129_int64(x int64) bool { return x < -129 }
+func le_neg129_int64(x int64) bool { return x <= -129 }
+func gt_neg129_int64(x int64) bool { return x > -129 }
+func ge_neg129_int64(x int64) bool { return x >= -129 }
+func eq_neg129_int64(x int64) bool { return x == -129 }
+func ne_neg129_int64(x int64) bool { return x != -129 }
+func lt_neg128_int64(x int64) bool { return x < -128 }
+func le_neg128_int64(x int64) bool { return x <= -128 }
+func gt_neg128_int64(x int64) bool { return x > -128 }
+func ge_neg128_int64(x int64) bool { return x >= -128 }
+func eq_neg128_int64(x int64) bool { return x == -128 }
+func ne_neg128_int64(x int64) bool { return x != -128 }
+func lt_neg127_int64(x int64) bool { return x < -127 }
+func le_neg127_int64(x int64) bool { return x <= -127 }
+func gt_neg127_int64(x int64) bool { return x > -127 }
+func ge_neg127_int64(x int64) bool { return x >= -127 }
+func eq_neg127_int64(x int64) bool { return x == -127 }
+func ne_neg127_int64(x int64) bool { return x != -127 }
+func lt_neg1_int64(x int64) bool { return x < -1 }
+func le_neg1_int64(x int64) bool { return x <= -1 }
+func gt_neg1_int64(x int64) bool { return x > -1 }
+func ge_neg1_int64(x int64) bool { return x >= -1 }
+func eq_neg1_int64(x int64) bool { return x == -1 }
+func ne_neg1_int64(x int64) bool { return x != -1 }
+func lt_0_int64(x int64) bool { return x < 0 }
+func le_0_int64(x int64) bool { return x <= 0 }
+func gt_0_int64(x int64) bool { return x > 0 }
+func ge_0_int64(x int64) bool { return x >= 0 }
+func eq_0_int64(x int64) bool { return x == 0 }
+func ne_0_int64(x int64) bool { return x != 0 }
+func lt_1_int64(x int64) bool { return x < 1 }
+func le_1_int64(x int64) bool { return x <= 1 }
+func gt_1_int64(x int64) bool { return x > 1 }
+func ge_1_int64(x int64) bool { return x >= 1 }
+func eq_1_int64(x int64) bool { return x == 1 }
+func ne_1_int64(x int64) bool { return x != 1 }
+func lt_126_int64(x int64) bool { return x < 126 }
+func le_126_int64(x int64) bool { return x <= 126 }
+func gt_126_int64(x int64) bool { return x > 126 }
+func ge_126_int64(x int64) bool { return x >= 126 }
+func eq_126_int64(x int64) bool { return x == 126 }
+func ne_126_int64(x int64) bool { return x != 126 }
+func lt_127_int64(x int64) bool { return x < 127 }
+func le_127_int64(x int64) bool { return x <= 127 }
+func gt_127_int64(x int64) bool { return x > 127 }
+func ge_127_int64(x int64) bool { return x >= 127 }
+func eq_127_int64(x int64) bool { return x == 127 }
+func ne_127_int64(x int64) bool { return x != 127 }
+func lt_128_int64(x int64) bool { return x < 128 }
+func le_128_int64(x int64) bool { return x <= 128 }
+func gt_128_int64(x int64) bool { return x > 128 }
+func ge_128_int64(x int64) bool { return x >= 128 }
+func eq_128_int64(x int64) bool { return x == 128 }
+func ne_128_int64(x int64) bool { return x != 128 }
+func lt_254_int64(x int64) bool { return x < 254 }
+func le_254_int64(x int64) bool { return x <= 254 }
+func gt_254_int64(x int64) bool { return x > 254 }
+func ge_254_int64(x int64) bool { return x >= 254 }
+func eq_254_int64(x int64) bool { return x == 254 }
+func ne_254_int64(x int64) bool { return x != 254 }
+func lt_255_int64(x int64) bool { return x < 255 }
+func le_255_int64(x int64) bool { return x <= 255 }
+func gt_255_int64(x int64) bool { return x > 255 }
+func ge_255_int64(x int64) bool { return x >= 255 }
+func eq_255_int64(x int64) bool { return x == 255 }
+func ne_255_int64(x int64) bool { return x != 255 }
+func lt_256_int64(x int64) bool { return x < 256 }
+func le_256_int64(x int64) bool { return x <= 256 }
+func gt_256_int64(x int64) bool { return x > 256 }
+func ge_256_int64(x int64) bool { return x >= 256 }
+func eq_256_int64(x int64) bool { return x == 256 }
+func ne_256_int64(x int64) bool { return x != 256 }
+func lt_32766_int64(x int64) bool { return x < 32766 }
+func le_32766_int64(x int64) bool { return x <= 32766 }
+func gt_32766_int64(x int64) bool { return x > 32766 }
+func ge_32766_int64(x int64) bool { return x >= 32766 }
+func eq_32766_int64(x int64) bool { return x == 32766 }
+func ne_32766_int64(x int64) bool { return x != 32766 }
+func lt_32767_int64(x int64) bool { return x < 32767 }
+func le_32767_int64(x int64) bool { return x <= 32767 }
+func gt_32767_int64(x int64) bool { return x > 32767 }
+func ge_32767_int64(x int64) bool { return x >= 32767 }
+func eq_32767_int64(x int64) bool { return x == 32767 }
+func ne_32767_int64(x int64) bool { return x != 32767 }
+func lt_32768_int64(x int64) bool { return x < 32768 }
+func le_32768_int64(x int64) bool { return x <= 32768 }
+func gt_32768_int64(x int64) bool { return x > 32768 }
+func ge_32768_int64(x int64) bool { return x >= 32768 }
+func eq_32768_int64(x int64) bool { return x == 32768 }
+func ne_32768_int64(x int64) bool { return x != 32768 }
+func lt_65534_int64(x int64) bool { return x < 65534 }
+func le_65534_int64(x int64) bool { return x <= 65534 }
+func gt_65534_int64(x int64) bool { return x > 65534 }
+func ge_65534_int64(x int64) bool { return x >= 65534 }
+func eq_65534_int64(x int64) bool { return x == 65534 }
+func ne_65534_int64(x int64) bool { return x != 65534 }
+func lt_65535_int64(x int64) bool { return x < 65535 }
+func le_65535_int64(x int64) bool { return x <= 65535 }
+func gt_65535_int64(x int64) bool { return x > 65535 }
+func ge_65535_int64(x int64) bool { return x >= 65535 }
+func eq_65535_int64(x int64) bool { return x == 65535 }
+func ne_65535_int64(x int64) bool { return x != 65535 }
+func lt_65536_int64(x int64) bool { return x < 65536 }
+func le_65536_int64(x int64) bool { return x <= 65536 }
+func gt_65536_int64(x int64) bool { return x > 65536 }
+func ge_65536_int64(x int64) bool { return x >= 65536 }
+func eq_65536_int64(x int64) bool { return x == 65536 }
+func ne_65536_int64(x int64) bool { return x != 65536 }
+func lt_2147483646_int64(x int64) bool { return x < 2147483646 }
+func le_2147483646_int64(x int64) bool { return x <= 2147483646 }
+func gt_2147483646_int64(x int64) bool { return x > 2147483646 }
+func ge_2147483646_int64(x int64) bool { return x >= 2147483646 }
+func eq_2147483646_int64(x int64) bool { return x == 2147483646 }
+func ne_2147483646_int64(x int64) bool { return x != 2147483646 }
+func lt_2147483647_int64(x int64) bool { return x < 2147483647 }
+func le_2147483647_int64(x int64) bool { return x <= 2147483647 }
+func gt_2147483647_int64(x int64) bool { return x > 2147483647 }
+func ge_2147483647_int64(x int64) bool { return x >= 2147483647 }
+func eq_2147483647_int64(x int64) bool { return x == 2147483647 }
+func ne_2147483647_int64(x int64) bool { return x != 2147483647 }
+func lt_2147483648_int64(x int64) bool { return x < 2147483648 }
+func le_2147483648_int64(x int64) bool { return x <= 2147483648 }
+func gt_2147483648_int64(x int64) bool { return x > 2147483648 }
+func ge_2147483648_int64(x int64) bool { return x >= 2147483648 }
+func eq_2147483648_int64(x int64) bool { return x == 2147483648 }
+func ne_2147483648_int64(x int64) bool { return x != 2147483648 }
+func lt_4278190080_int64(x int64) bool { return x < 4278190080 }
+func le_4278190080_int64(x int64) bool { return x <= 4278190080 }
+func gt_4278190080_int64(x int64) bool { return x > 4278190080 }
+func ge_4278190080_int64(x int64) bool { return x >= 4278190080 }
+func eq_4278190080_int64(x int64) bool { return x == 4278190080 }
+func ne_4278190080_int64(x int64) bool { return x != 4278190080 }
+func lt_4294967294_int64(x int64) bool { return x < 4294967294 }
+func le_4294967294_int64(x int64) bool { return x <= 4294967294 }
+func gt_4294967294_int64(x int64) bool { return x > 4294967294 }
+func ge_4294967294_int64(x int64) bool { return x >= 4294967294 }
+func eq_4294967294_int64(x int64) bool { return x == 4294967294 }
+func ne_4294967294_int64(x int64) bool { return x != 4294967294 }
+func lt_4294967295_int64(x int64) bool { return x < 4294967295 }
+func le_4294967295_int64(x int64) bool { return x <= 4294967295 }
+func gt_4294967295_int64(x int64) bool { return x > 4294967295 }
+func ge_4294967295_int64(x int64) bool { return x >= 4294967295 }
+func eq_4294967295_int64(x int64) bool { return x == 4294967295 }
+func ne_4294967295_int64(x int64) bool { return x != 4294967295 }
+func lt_4294967296_int64(x int64) bool { return x < 4294967296 }
+func le_4294967296_int64(x int64) bool { return x <= 4294967296 }
+func gt_4294967296_int64(x int64) bool { return x > 4294967296 }
+func ge_4294967296_int64(x int64) bool { return x >= 4294967296 }
+func eq_4294967296_int64(x int64) bool { return x == 4294967296 }
+func ne_4294967296_int64(x int64) bool { return x != 4294967296 }
+func lt_1095216660480_int64(x int64) bool { return x < 1095216660480 }
+func le_1095216660480_int64(x int64) bool { return x <= 1095216660480 }
+func gt_1095216660480_int64(x int64) bool { return x > 1095216660480 }
+func ge_1095216660480_int64(x int64) bool { return x >= 1095216660480 }
+func eq_1095216660480_int64(x int64) bool { return x == 1095216660480 }
+func ne_1095216660480_int64(x int64) bool { return x != 1095216660480 }
+func lt_9223372036854775806_int64(x int64) bool { return x < 9223372036854775806 }
+func le_9223372036854775806_int64(x int64) bool { return x <= 9223372036854775806 }
+func gt_9223372036854775806_int64(x int64) bool { return x > 9223372036854775806 }
+func ge_9223372036854775806_int64(x int64) bool { return x >= 9223372036854775806 }
+func eq_9223372036854775806_int64(x int64) bool { return x == 9223372036854775806 }
+func ne_9223372036854775806_int64(x int64) bool { return x != 9223372036854775806 }
+func lt_9223372036854775807_int64(x int64) bool { return x < 9223372036854775807 }
+func le_9223372036854775807_int64(x int64) bool { return x <= 9223372036854775807 }
+func gt_9223372036854775807_int64(x int64) bool { return x > 9223372036854775807 }
+func ge_9223372036854775807_int64(x int64) bool { return x >= 9223372036854775807 }
+func eq_9223372036854775807_int64(x int64) bool { return x == 9223372036854775807 }
+func ne_9223372036854775807_int64(x int64) bool { return x != 9223372036854775807 }
+
+var int64_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(int64) bool
+}{
+ {idx: 0, exp: lt, fn: lt_neg9223372036854775808_int64},
+ {idx: 0, exp: le, fn: le_neg9223372036854775808_int64},
+ {idx: 0, exp: gt, fn: gt_neg9223372036854775808_int64},
+ {idx: 0, exp: ge, fn: ge_neg9223372036854775808_int64},
+ {idx: 0, exp: eq, fn: eq_neg9223372036854775808_int64},
+ {idx: 0, exp: ne, fn: ne_neg9223372036854775808_int64},
+ {idx: 1, exp: lt, fn: lt_neg9223372036854775807_int64},
+ {idx: 1, exp: le, fn: le_neg9223372036854775807_int64},
+ {idx: 1, exp: gt, fn: gt_neg9223372036854775807_int64},
+ {idx: 1, exp: ge, fn: ge_neg9223372036854775807_int64},
+ {idx: 1, exp: eq, fn: eq_neg9223372036854775807_int64},
+ {idx: 1, exp: ne, fn: ne_neg9223372036854775807_int64},
+ {idx: 2, exp: lt, fn: lt_neg2147483649_int64},
+ {idx: 2, exp: le, fn: le_neg2147483649_int64},
+ {idx: 2, exp: gt, fn: gt_neg2147483649_int64},
+ {idx: 2, exp: ge, fn: ge_neg2147483649_int64},
+ {idx: 2, exp: eq, fn: eq_neg2147483649_int64},
+ {idx: 2, exp: ne, fn: ne_neg2147483649_int64},
+ {idx: 3, exp: lt, fn: lt_neg2147483648_int64},
+ {idx: 3, exp: le, fn: le_neg2147483648_int64},
+ {idx: 3, exp: gt, fn: gt_neg2147483648_int64},
+ {idx: 3, exp: ge, fn: ge_neg2147483648_int64},
+ {idx: 3, exp: eq, fn: eq_neg2147483648_int64},
+ {idx: 3, exp: ne, fn: ne_neg2147483648_int64},
+ {idx: 4, exp: lt, fn: lt_neg2147483647_int64},
+ {idx: 4, exp: le, fn: le_neg2147483647_int64},
+ {idx: 4, exp: gt, fn: gt_neg2147483647_int64},
+ {idx: 4, exp: ge, fn: ge_neg2147483647_int64},
+ {idx: 4, exp: eq, fn: eq_neg2147483647_int64},
+ {idx: 4, exp: ne, fn: ne_neg2147483647_int64},
+ {idx: 5, exp: lt, fn: lt_neg32769_int64},
+ {idx: 5, exp: le, fn: le_neg32769_int64},
+ {idx: 5, exp: gt, fn: gt_neg32769_int64},
+ {idx: 5, exp: ge, fn: ge_neg32769_int64},
+ {idx: 5, exp: eq, fn: eq_neg32769_int64},
+ {idx: 5, exp: ne, fn: ne_neg32769_int64},
+ {idx: 6, exp: lt, fn: lt_neg32768_int64},
+ {idx: 6, exp: le, fn: le_neg32768_int64},
+ {idx: 6, exp: gt, fn: gt_neg32768_int64},
+ {idx: 6, exp: ge, fn: ge_neg32768_int64},
+ {idx: 6, exp: eq, fn: eq_neg32768_int64},
+ {idx: 6, exp: ne, fn: ne_neg32768_int64},
+ {idx: 7, exp: lt, fn: lt_neg32767_int64},
+ {idx: 7, exp: le, fn: le_neg32767_int64},
+ {idx: 7, exp: gt, fn: gt_neg32767_int64},
+ {idx: 7, exp: ge, fn: ge_neg32767_int64},
+ {idx: 7, exp: eq, fn: eq_neg32767_int64},
+ {idx: 7, exp: ne, fn: ne_neg32767_int64},
+ {idx: 8, exp: lt, fn: lt_neg129_int64},
+ {idx: 8, exp: le, fn: le_neg129_int64},
+ {idx: 8, exp: gt, fn: gt_neg129_int64},
+ {idx: 8, exp: ge, fn: ge_neg129_int64},
+ {idx: 8, exp: eq, fn: eq_neg129_int64},
+ {idx: 8, exp: ne, fn: ne_neg129_int64},
+ {idx: 9, exp: lt, fn: lt_neg128_int64},
+ {idx: 9, exp: le, fn: le_neg128_int64},
+ {idx: 9, exp: gt, fn: gt_neg128_int64},
+ {idx: 9, exp: ge, fn: ge_neg128_int64},
+ {idx: 9, exp: eq, fn: eq_neg128_int64},
+ {idx: 9, exp: ne, fn: ne_neg128_int64},
+ {idx: 10, exp: lt, fn: lt_neg127_int64},
+ {idx: 10, exp: le, fn: le_neg127_int64},
+ {idx: 10, exp: gt, fn: gt_neg127_int64},
+ {idx: 10, exp: ge, fn: ge_neg127_int64},
+ {idx: 10, exp: eq, fn: eq_neg127_int64},
+ {idx: 10, exp: ne, fn: ne_neg127_int64},
+ {idx: 11, exp: lt, fn: lt_neg1_int64},
+ {idx: 11, exp: le, fn: le_neg1_int64},
+ {idx: 11, exp: gt, fn: gt_neg1_int64},
+ {idx: 11, exp: ge, fn: ge_neg1_int64},
+ {idx: 11, exp: eq, fn: eq_neg1_int64},
+ {idx: 11, exp: ne, fn: ne_neg1_int64},
+ {idx: 12, exp: lt, fn: lt_0_int64},
+ {idx: 12, exp: le, fn: le_0_int64},
+ {idx: 12, exp: gt, fn: gt_0_int64},
+ {idx: 12, exp: ge, fn: ge_0_int64},
+ {idx: 12, exp: eq, fn: eq_0_int64},
+ {idx: 12, exp: ne, fn: ne_0_int64},
+ {idx: 13, exp: lt, fn: lt_1_int64},
+ {idx: 13, exp: le, fn: le_1_int64},
+ {idx: 13, exp: gt, fn: gt_1_int64},
+ {idx: 13, exp: ge, fn: ge_1_int64},
+ {idx: 13, exp: eq, fn: eq_1_int64},
+ {idx: 13, exp: ne, fn: ne_1_int64},
+ {idx: 14, exp: lt, fn: lt_126_int64},
+ {idx: 14, exp: le, fn: le_126_int64},
+ {idx: 14, exp: gt, fn: gt_126_int64},
+ {idx: 14, exp: ge, fn: ge_126_int64},
+ {idx: 14, exp: eq, fn: eq_126_int64},
+ {idx: 14, exp: ne, fn: ne_126_int64},
+ {idx: 15, exp: lt, fn: lt_127_int64},
+ {idx: 15, exp: le, fn: le_127_int64},
+ {idx: 15, exp: gt, fn: gt_127_int64},
+ {idx: 15, exp: ge, fn: ge_127_int64},
+ {idx: 15, exp: eq, fn: eq_127_int64},
+ {idx: 15, exp: ne, fn: ne_127_int64},
+ {idx: 16, exp: lt, fn: lt_128_int64},
+ {idx: 16, exp: le, fn: le_128_int64},
+ {idx: 16, exp: gt, fn: gt_128_int64},
+ {idx: 16, exp: ge, fn: ge_128_int64},
+ {idx: 16, exp: eq, fn: eq_128_int64},
+ {idx: 16, exp: ne, fn: ne_128_int64},
+ {idx: 17, exp: lt, fn: lt_254_int64},
+ {idx: 17, exp: le, fn: le_254_int64},
+ {idx: 17, exp: gt, fn: gt_254_int64},
+ {idx: 17, exp: ge, fn: ge_254_int64},
+ {idx: 17, exp: eq, fn: eq_254_int64},
+ {idx: 17, exp: ne, fn: ne_254_int64},
+ {idx: 18, exp: lt, fn: lt_255_int64},
+ {idx: 18, exp: le, fn: le_255_int64},
+ {idx: 18, exp: gt, fn: gt_255_int64},
+ {idx: 18, exp: ge, fn: ge_255_int64},
+ {idx: 18, exp: eq, fn: eq_255_int64},
+ {idx: 18, exp: ne, fn: ne_255_int64},
+ {idx: 19, exp: lt, fn: lt_256_int64},
+ {idx: 19, exp: le, fn: le_256_int64},
+ {idx: 19, exp: gt, fn: gt_256_int64},
+ {idx: 19, exp: ge, fn: ge_256_int64},
+ {idx: 19, exp: eq, fn: eq_256_int64},
+ {idx: 19, exp: ne, fn: ne_256_int64},
+ {idx: 20, exp: lt, fn: lt_32766_int64},
+ {idx: 20, exp: le, fn: le_32766_int64},
+ {idx: 20, exp: gt, fn: gt_32766_int64},
+ {idx: 20, exp: ge, fn: ge_32766_int64},
+ {idx: 20, exp: eq, fn: eq_32766_int64},
+ {idx: 20, exp: ne, fn: ne_32766_int64},
+ {idx: 21, exp: lt, fn: lt_32767_int64},
+ {idx: 21, exp: le, fn: le_32767_int64},
+ {idx: 21, exp: gt, fn: gt_32767_int64},
+ {idx: 21, exp: ge, fn: ge_32767_int64},
+ {idx: 21, exp: eq, fn: eq_32767_int64},
+ {idx: 21, exp: ne, fn: ne_32767_int64},
+ {idx: 22, exp: lt, fn: lt_32768_int64},
+ {idx: 22, exp: le, fn: le_32768_int64},
+ {idx: 22, exp: gt, fn: gt_32768_int64},
+ {idx: 22, exp: ge, fn: ge_32768_int64},
+ {idx: 22, exp: eq, fn: eq_32768_int64},
+ {idx: 22, exp: ne, fn: ne_32768_int64},
+ {idx: 23, exp: lt, fn: lt_65534_int64},
+ {idx: 23, exp: le, fn: le_65534_int64},
+ {idx: 23, exp: gt, fn: gt_65534_int64},
+ {idx: 23, exp: ge, fn: ge_65534_int64},
+ {idx: 23, exp: eq, fn: eq_65534_int64},
+ {idx: 23, exp: ne, fn: ne_65534_int64},
+ {idx: 24, exp: lt, fn: lt_65535_int64},
+ {idx: 24, exp: le, fn: le_65535_int64},
+ {idx: 24, exp: gt, fn: gt_65535_int64},
+ {idx: 24, exp: ge, fn: ge_65535_int64},
+ {idx: 24, exp: eq, fn: eq_65535_int64},
+ {idx: 24, exp: ne, fn: ne_65535_int64},
+ {idx: 25, exp: lt, fn: lt_65536_int64},
+ {idx: 25, exp: le, fn: le_65536_int64},
+ {idx: 25, exp: gt, fn: gt_65536_int64},
+ {idx: 25, exp: ge, fn: ge_65536_int64},
+ {idx: 25, exp: eq, fn: eq_65536_int64},
+ {idx: 25, exp: ne, fn: ne_65536_int64},
+ {idx: 26, exp: lt, fn: lt_2147483646_int64},
+ {idx: 26, exp: le, fn: le_2147483646_int64},
+ {idx: 26, exp: gt, fn: gt_2147483646_int64},
+ {idx: 26, exp: ge, fn: ge_2147483646_int64},
+ {idx: 26, exp: eq, fn: eq_2147483646_int64},
+ {idx: 26, exp: ne, fn: ne_2147483646_int64},
+ {idx: 27, exp: lt, fn: lt_2147483647_int64},
+ {idx: 27, exp: le, fn: le_2147483647_int64},
+ {idx: 27, exp: gt, fn: gt_2147483647_int64},
+ {idx: 27, exp: ge, fn: ge_2147483647_int64},
+ {idx: 27, exp: eq, fn: eq_2147483647_int64},
+ {idx: 27, exp: ne, fn: ne_2147483647_int64},
+ {idx: 28, exp: lt, fn: lt_2147483648_int64},
+ {idx: 28, exp: le, fn: le_2147483648_int64},
+ {idx: 28, exp: gt, fn: gt_2147483648_int64},
+ {idx: 28, exp: ge, fn: ge_2147483648_int64},
+ {idx: 28, exp: eq, fn: eq_2147483648_int64},
+ {idx: 28, exp: ne, fn: ne_2147483648_int64},
+ {idx: 29, exp: lt, fn: lt_4278190080_int64},
+ {idx: 29, exp: le, fn: le_4278190080_int64},
+ {idx: 29, exp: gt, fn: gt_4278190080_int64},
+ {idx: 29, exp: ge, fn: ge_4278190080_int64},
+ {idx: 29, exp: eq, fn: eq_4278190080_int64},
+ {idx: 29, exp: ne, fn: ne_4278190080_int64},
+ {idx: 30, exp: lt, fn: lt_4294967294_int64},
+ {idx: 30, exp: le, fn: le_4294967294_int64},
+ {idx: 30, exp: gt, fn: gt_4294967294_int64},
+ {idx: 30, exp: ge, fn: ge_4294967294_int64},
+ {idx: 30, exp: eq, fn: eq_4294967294_int64},
+ {idx: 30, exp: ne, fn: ne_4294967294_int64},
+ {idx: 31, exp: lt, fn: lt_4294967295_int64},
+ {idx: 31, exp: le, fn: le_4294967295_int64},
+ {idx: 31, exp: gt, fn: gt_4294967295_int64},
+ {idx: 31, exp: ge, fn: ge_4294967295_int64},
+ {idx: 31, exp: eq, fn: eq_4294967295_int64},
+ {idx: 31, exp: ne, fn: ne_4294967295_int64},
+ {idx: 32, exp: lt, fn: lt_4294967296_int64},
+ {idx: 32, exp: le, fn: le_4294967296_int64},
+ {idx: 32, exp: gt, fn: gt_4294967296_int64},
+ {idx: 32, exp: ge, fn: ge_4294967296_int64},
+ {idx: 32, exp: eq, fn: eq_4294967296_int64},
+ {idx: 32, exp: ne, fn: ne_4294967296_int64},
+ {idx: 33, exp: lt, fn: lt_1095216660480_int64},
+ {idx: 33, exp: le, fn: le_1095216660480_int64},
+ {idx: 33, exp: gt, fn: gt_1095216660480_int64},
+ {idx: 33, exp: ge, fn: ge_1095216660480_int64},
+ {idx: 33, exp: eq, fn: eq_1095216660480_int64},
+ {idx: 33, exp: ne, fn: ne_1095216660480_int64},
+ {idx: 34, exp: lt, fn: lt_9223372036854775806_int64},
+ {idx: 34, exp: le, fn: le_9223372036854775806_int64},
+ {idx: 34, exp: gt, fn: gt_9223372036854775806_int64},
+ {idx: 34, exp: ge, fn: ge_9223372036854775806_int64},
+ {idx: 34, exp: eq, fn: eq_9223372036854775806_int64},
+ {idx: 34, exp: ne, fn: ne_9223372036854775806_int64},
+ {idx: 35, exp: lt, fn: lt_9223372036854775807_int64},
+ {idx: 35, exp: le, fn: le_9223372036854775807_int64},
+ {idx: 35, exp: gt, fn: gt_9223372036854775807_int64},
+ {idx: 35, exp: ge, fn: ge_9223372036854775807_int64},
+ {idx: 35, exp: eq, fn: eq_9223372036854775807_int64},
+ {idx: 35, exp: ne, fn: ne_9223372036854775807_int64},
+}
+
+// int32 tests
+var int32_vals = []int32{
+ -2147483648,
+ -2147483647,
+ -32769,
+ -32768,
+ -32767,
+ -129,
+ -128,
+ -127,
+ -1,
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+ 32768,
+ 65534,
+ 65535,
+ 65536,
+ 2147483646,
+ 2147483647,
+}
+
+func lt_neg2147483648_int32(x int32) bool { return x < -2147483648 }
+func le_neg2147483648_int32(x int32) bool { return x <= -2147483648 }
+func gt_neg2147483648_int32(x int32) bool { return x > -2147483648 }
+func ge_neg2147483648_int32(x int32) bool { return x >= -2147483648 }
+func eq_neg2147483648_int32(x int32) bool { return x == -2147483648 }
+func ne_neg2147483648_int32(x int32) bool { return x != -2147483648 }
+func lt_neg2147483647_int32(x int32) bool { return x < -2147483647 }
+func le_neg2147483647_int32(x int32) bool { return x <= -2147483647 }
+func gt_neg2147483647_int32(x int32) bool { return x > -2147483647 }
+func ge_neg2147483647_int32(x int32) bool { return x >= -2147483647 }
+func eq_neg2147483647_int32(x int32) bool { return x == -2147483647 }
+func ne_neg2147483647_int32(x int32) bool { return x != -2147483647 }
+func lt_neg32769_int32(x int32) bool { return x < -32769 }
+func le_neg32769_int32(x int32) bool { return x <= -32769 }
+func gt_neg32769_int32(x int32) bool { return x > -32769 }
+func ge_neg32769_int32(x int32) bool { return x >= -32769 }
+func eq_neg32769_int32(x int32) bool { return x == -32769 }
+func ne_neg32769_int32(x int32) bool { return x != -32769 }
+func lt_neg32768_int32(x int32) bool { return x < -32768 }
+func le_neg32768_int32(x int32) bool { return x <= -32768 }
+func gt_neg32768_int32(x int32) bool { return x > -32768 }
+func ge_neg32768_int32(x int32) bool { return x >= -32768 }
+func eq_neg32768_int32(x int32) bool { return x == -32768 }
+func ne_neg32768_int32(x int32) bool { return x != -32768 }
+func lt_neg32767_int32(x int32) bool { return x < -32767 }
+func le_neg32767_int32(x int32) bool { return x <= -32767 }
+func gt_neg32767_int32(x int32) bool { return x > -32767 }
+func ge_neg32767_int32(x int32) bool { return x >= -32767 }
+func eq_neg32767_int32(x int32) bool { return x == -32767 }
+func ne_neg32767_int32(x int32) bool { return x != -32767 }
+func lt_neg129_int32(x int32) bool { return x < -129 }
+func le_neg129_int32(x int32) bool { return x <= -129 }
+func gt_neg129_int32(x int32) bool { return x > -129 }
+func ge_neg129_int32(x int32) bool { return x >= -129 }
+func eq_neg129_int32(x int32) bool { return x == -129 }
+func ne_neg129_int32(x int32) bool { return x != -129 }
+func lt_neg128_int32(x int32) bool { return x < -128 }
+func le_neg128_int32(x int32) bool { return x <= -128 }
+func gt_neg128_int32(x int32) bool { return x > -128 }
+func ge_neg128_int32(x int32) bool { return x >= -128 }
+func eq_neg128_int32(x int32) bool { return x == -128 }
+func ne_neg128_int32(x int32) bool { return x != -128 }
+func lt_neg127_int32(x int32) bool { return x < -127 }
+func le_neg127_int32(x int32) bool { return x <= -127 }
+func gt_neg127_int32(x int32) bool { return x > -127 }
+func ge_neg127_int32(x int32) bool { return x >= -127 }
+func eq_neg127_int32(x int32) bool { return x == -127 }
+func ne_neg127_int32(x int32) bool { return x != -127 }
+func lt_neg1_int32(x int32) bool { return x < -1 }
+func le_neg1_int32(x int32) bool { return x <= -1 }
+func gt_neg1_int32(x int32) bool { return x > -1 }
+func ge_neg1_int32(x int32) bool { return x >= -1 }
+func eq_neg1_int32(x int32) bool { return x == -1 }
+func ne_neg1_int32(x int32) bool { return x != -1 }
+func lt_0_int32(x int32) bool { return x < 0 }
+func le_0_int32(x int32) bool { return x <= 0 }
+func gt_0_int32(x int32) bool { return x > 0 }
+func ge_0_int32(x int32) bool { return x >= 0 }
+func eq_0_int32(x int32) bool { return x == 0 }
+func ne_0_int32(x int32) bool { return x != 0 }
+func lt_1_int32(x int32) bool { return x < 1 }
+func le_1_int32(x int32) bool { return x <= 1 }
+func gt_1_int32(x int32) bool { return x > 1 }
+func ge_1_int32(x int32) bool { return x >= 1 }
+func eq_1_int32(x int32) bool { return x == 1 }
+func ne_1_int32(x int32) bool { return x != 1 }
+func lt_126_int32(x int32) bool { return x < 126 }
+func le_126_int32(x int32) bool { return x <= 126 }
+func gt_126_int32(x int32) bool { return x > 126 }
+func ge_126_int32(x int32) bool { return x >= 126 }
+func eq_126_int32(x int32) bool { return x == 126 }
+func ne_126_int32(x int32) bool { return x != 126 }
+func lt_127_int32(x int32) bool { return x < 127 }
+func le_127_int32(x int32) bool { return x <= 127 }
+func gt_127_int32(x int32) bool { return x > 127 }
+func ge_127_int32(x int32) bool { return x >= 127 }
+func eq_127_int32(x int32) bool { return x == 127 }
+func ne_127_int32(x int32) bool { return x != 127 }
+func lt_128_int32(x int32) bool { return x < 128 }
+func le_128_int32(x int32) bool { return x <= 128 }
+func gt_128_int32(x int32) bool { return x > 128 }
+func ge_128_int32(x int32) bool { return x >= 128 }
+func eq_128_int32(x int32) bool { return x == 128 }
+func ne_128_int32(x int32) bool { return x != 128 }
+func lt_254_int32(x int32) bool { return x < 254 }
+func le_254_int32(x int32) bool { return x <= 254 }
+func gt_254_int32(x int32) bool { return x > 254 }
+func ge_254_int32(x int32) bool { return x >= 254 }
+func eq_254_int32(x int32) bool { return x == 254 }
+func ne_254_int32(x int32) bool { return x != 254 }
+func lt_255_int32(x int32) bool { return x < 255 }
+func le_255_int32(x int32) bool { return x <= 255 }
+func gt_255_int32(x int32) bool { return x > 255 }
+func ge_255_int32(x int32) bool { return x >= 255 }
+func eq_255_int32(x int32) bool { return x == 255 }
+func ne_255_int32(x int32) bool { return x != 255 }
+func lt_256_int32(x int32) bool { return x < 256 }
+func le_256_int32(x int32) bool { return x <= 256 }
+func gt_256_int32(x int32) bool { return x > 256 }
+func ge_256_int32(x int32) bool { return x >= 256 }
+func eq_256_int32(x int32) bool { return x == 256 }
+func ne_256_int32(x int32) bool { return x != 256 }
+func lt_32766_int32(x int32) bool { return x < 32766 }
+func le_32766_int32(x int32) bool { return x <= 32766 }
+func gt_32766_int32(x int32) bool { return x > 32766 }
+func ge_32766_int32(x int32) bool { return x >= 32766 }
+func eq_32766_int32(x int32) bool { return x == 32766 }
+func ne_32766_int32(x int32) bool { return x != 32766 }
+func lt_32767_int32(x int32) bool { return x < 32767 }
+func le_32767_int32(x int32) bool { return x <= 32767 }
+func gt_32767_int32(x int32) bool { return x > 32767 }
+func ge_32767_int32(x int32) bool { return x >= 32767 }
+func eq_32767_int32(x int32) bool { return x == 32767 }
+func ne_32767_int32(x int32) bool { return x != 32767 }
+func lt_32768_int32(x int32) bool { return x < 32768 }
+func le_32768_int32(x int32) bool { return x <= 32768 }
+func gt_32768_int32(x int32) bool { return x > 32768 }
+func ge_32768_int32(x int32) bool { return x >= 32768 }
+func eq_32768_int32(x int32) bool { return x == 32768 }
+func ne_32768_int32(x int32) bool { return x != 32768 }
+func lt_65534_int32(x int32) bool { return x < 65534 }
+func le_65534_int32(x int32) bool { return x <= 65534 }
+func gt_65534_int32(x int32) bool { return x > 65534 }
+func ge_65534_int32(x int32) bool { return x >= 65534 }
+func eq_65534_int32(x int32) bool { return x == 65534 }
+func ne_65534_int32(x int32) bool { return x != 65534 }
+func lt_65535_int32(x int32) bool { return x < 65535 }
+func le_65535_int32(x int32) bool { return x <= 65535 }
+func gt_65535_int32(x int32) bool { return x > 65535 }
+func ge_65535_int32(x int32) bool { return x >= 65535 }
+func eq_65535_int32(x int32) bool { return x == 65535 }
+func ne_65535_int32(x int32) bool { return x != 65535 }
+func lt_65536_int32(x int32) bool { return x < 65536 }
+func le_65536_int32(x int32) bool { return x <= 65536 }
+func gt_65536_int32(x int32) bool { return x > 65536 }
+func ge_65536_int32(x int32) bool { return x >= 65536 }
+func eq_65536_int32(x int32) bool { return x == 65536 }
+func ne_65536_int32(x int32) bool { return x != 65536 }
+func lt_2147483646_int32(x int32) bool { return x < 2147483646 }
+func le_2147483646_int32(x int32) bool { return x <= 2147483646 }
+func gt_2147483646_int32(x int32) bool { return x > 2147483646 }
+func ge_2147483646_int32(x int32) bool { return x >= 2147483646 }
+func eq_2147483646_int32(x int32) bool { return x == 2147483646 }
+func ne_2147483646_int32(x int32) bool { return x != 2147483646 }
+func lt_2147483647_int32(x int32) bool { return x < 2147483647 }
+func le_2147483647_int32(x int32) bool { return x <= 2147483647 }
+func gt_2147483647_int32(x int32) bool { return x > 2147483647 }
+func ge_2147483647_int32(x int32) bool { return x >= 2147483647 }
+func eq_2147483647_int32(x int32) bool { return x == 2147483647 }
+func ne_2147483647_int32(x int32) bool { return x != 2147483647 }
+
+var int32_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(int32) bool
+}{
+ {idx: 0, exp: lt, fn: lt_neg2147483648_int32},
+ {idx: 0, exp: le, fn: le_neg2147483648_int32},
+ {idx: 0, exp: gt, fn: gt_neg2147483648_int32},
+ {idx: 0, exp: ge, fn: ge_neg2147483648_int32},
+ {idx: 0, exp: eq, fn: eq_neg2147483648_int32},
+ {idx: 0, exp: ne, fn: ne_neg2147483648_int32},
+ {idx: 1, exp: lt, fn: lt_neg2147483647_int32},
+ {idx: 1, exp: le, fn: le_neg2147483647_int32},
+ {idx: 1, exp: gt, fn: gt_neg2147483647_int32},
+ {idx: 1, exp: ge, fn: ge_neg2147483647_int32},
+ {idx: 1, exp: eq, fn: eq_neg2147483647_int32},
+ {idx: 1, exp: ne, fn: ne_neg2147483647_int32},
+ {idx: 2, exp: lt, fn: lt_neg32769_int32},
+ {idx: 2, exp: le, fn: le_neg32769_int32},
+ {idx: 2, exp: gt, fn: gt_neg32769_int32},
+ {idx: 2, exp: ge, fn: ge_neg32769_int32},
+ {idx: 2, exp: eq, fn: eq_neg32769_int32},
+ {idx: 2, exp: ne, fn: ne_neg32769_int32},
+ {idx: 3, exp: lt, fn: lt_neg32768_int32},
+ {idx: 3, exp: le, fn: le_neg32768_int32},
+ {idx: 3, exp: gt, fn: gt_neg32768_int32},
+ {idx: 3, exp: ge, fn: ge_neg32768_int32},
+ {idx: 3, exp: eq, fn: eq_neg32768_int32},
+ {idx: 3, exp: ne, fn: ne_neg32768_int32},
+ {idx: 4, exp: lt, fn: lt_neg32767_int32},
+ {idx: 4, exp: le, fn: le_neg32767_int32},
+ {idx: 4, exp: gt, fn: gt_neg32767_int32},
+ {idx: 4, exp: ge, fn: ge_neg32767_int32},
+ {idx: 4, exp: eq, fn: eq_neg32767_int32},
+ {idx: 4, exp: ne, fn: ne_neg32767_int32},
+ {idx: 5, exp: lt, fn: lt_neg129_int32},
+ {idx: 5, exp: le, fn: le_neg129_int32},
+ {idx: 5, exp: gt, fn: gt_neg129_int32},
+ {idx: 5, exp: ge, fn: ge_neg129_int32},
+ {idx: 5, exp: eq, fn: eq_neg129_int32},
+ {idx: 5, exp: ne, fn: ne_neg129_int32},
+ {idx: 6, exp: lt, fn: lt_neg128_int32},
+ {idx: 6, exp: le, fn: le_neg128_int32},
+ {idx: 6, exp: gt, fn: gt_neg128_int32},
+ {idx: 6, exp: ge, fn: ge_neg128_int32},
+ {idx: 6, exp: eq, fn: eq_neg128_int32},
+ {idx: 6, exp: ne, fn: ne_neg128_int32},
+ {idx: 7, exp: lt, fn: lt_neg127_int32},
+ {idx: 7, exp: le, fn: le_neg127_int32},
+ {idx: 7, exp: gt, fn: gt_neg127_int32},
+ {idx: 7, exp: ge, fn: ge_neg127_int32},
+ {idx: 7, exp: eq, fn: eq_neg127_int32},
+ {idx: 7, exp: ne, fn: ne_neg127_int32},
+ {idx: 8, exp: lt, fn: lt_neg1_int32},
+ {idx: 8, exp: le, fn: le_neg1_int32},
+ {idx: 8, exp: gt, fn: gt_neg1_int32},
+ {idx: 8, exp: ge, fn: ge_neg1_int32},
+ {idx: 8, exp: eq, fn: eq_neg1_int32},
+ {idx: 8, exp: ne, fn: ne_neg1_int32},
+ {idx: 9, exp: lt, fn: lt_0_int32},
+ {idx: 9, exp: le, fn: le_0_int32},
+ {idx: 9, exp: gt, fn: gt_0_int32},
+ {idx: 9, exp: ge, fn: ge_0_int32},
+ {idx: 9, exp: eq, fn: eq_0_int32},
+ {idx: 9, exp: ne, fn: ne_0_int32},
+ {idx: 10, exp: lt, fn: lt_1_int32},
+ {idx: 10, exp: le, fn: le_1_int32},
+ {idx: 10, exp: gt, fn: gt_1_int32},
+ {idx: 10, exp: ge, fn: ge_1_int32},
+ {idx: 10, exp: eq, fn: eq_1_int32},
+ {idx: 10, exp: ne, fn: ne_1_int32},
+ {idx: 11, exp: lt, fn: lt_126_int32},
+ {idx: 11, exp: le, fn: le_126_int32},
+ {idx: 11, exp: gt, fn: gt_126_int32},
+ {idx: 11, exp: ge, fn: ge_126_int32},
+ {idx: 11, exp: eq, fn: eq_126_int32},
+ {idx: 11, exp: ne, fn: ne_126_int32},
+ {idx: 12, exp: lt, fn: lt_127_int32},
+ {idx: 12, exp: le, fn: le_127_int32},
+ {idx: 12, exp: gt, fn: gt_127_int32},
+ {idx: 12, exp: ge, fn: ge_127_int32},
+ {idx: 12, exp: eq, fn: eq_127_int32},
+ {idx: 12, exp: ne, fn: ne_127_int32},
+ {idx: 13, exp: lt, fn: lt_128_int32},
+ {idx: 13, exp: le, fn: le_128_int32},
+ {idx: 13, exp: gt, fn: gt_128_int32},
+ {idx: 13, exp: ge, fn: ge_128_int32},
+ {idx: 13, exp: eq, fn: eq_128_int32},
+ {idx: 13, exp: ne, fn: ne_128_int32},
+ {idx: 14, exp: lt, fn: lt_254_int32},
+ {idx: 14, exp: le, fn: le_254_int32},
+ {idx: 14, exp: gt, fn: gt_254_int32},
+ {idx: 14, exp: ge, fn: ge_254_int32},
+ {idx: 14, exp: eq, fn: eq_254_int32},
+ {idx: 14, exp: ne, fn: ne_254_int32},
+ {idx: 15, exp: lt, fn: lt_255_int32},
+ {idx: 15, exp: le, fn: le_255_int32},
+ {idx: 15, exp: gt, fn: gt_255_int32},
+ {idx: 15, exp: ge, fn: ge_255_int32},
+ {idx: 15, exp: eq, fn: eq_255_int32},
+ {idx: 15, exp: ne, fn: ne_255_int32},
+ {idx: 16, exp: lt, fn: lt_256_int32},
+ {idx: 16, exp: le, fn: le_256_int32},
+ {idx: 16, exp: gt, fn: gt_256_int32},
+ {idx: 16, exp: ge, fn: ge_256_int32},
+ {idx: 16, exp: eq, fn: eq_256_int32},
+ {idx: 16, exp: ne, fn: ne_256_int32},
+ {idx: 17, exp: lt, fn: lt_32766_int32},
+ {idx: 17, exp: le, fn: le_32766_int32},
+ {idx: 17, exp: gt, fn: gt_32766_int32},
+ {idx: 17, exp: ge, fn: ge_32766_int32},
+ {idx: 17, exp: eq, fn: eq_32766_int32},
+ {idx: 17, exp: ne, fn: ne_32766_int32},
+ {idx: 18, exp: lt, fn: lt_32767_int32},
+ {idx: 18, exp: le, fn: le_32767_int32},
+ {idx: 18, exp: gt, fn: gt_32767_int32},
+ {idx: 18, exp: ge, fn: ge_32767_int32},
+ {idx: 18, exp: eq, fn: eq_32767_int32},
+ {idx: 18, exp: ne, fn: ne_32767_int32},
+ {idx: 19, exp: lt, fn: lt_32768_int32},
+ {idx: 19, exp: le, fn: le_32768_int32},
+ {idx: 19, exp: gt, fn: gt_32768_int32},
+ {idx: 19, exp: ge, fn: ge_32768_int32},
+ {idx: 19, exp: eq, fn: eq_32768_int32},
+ {idx: 19, exp: ne, fn: ne_32768_int32},
+ {idx: 20, exp: lt, fn: lt_65534_int32},
+ {idx: 20, exp: le, fn: le_65534_int32},
+ {idx: 20, exp: gt, fn: gt_65534_int32},
+ {idx: 20, exp: ge, fn: ge_65534_int32},
+ {idx: 20, exp: eq, fn: eq_65534_int32},
+ {idx: 20, exp: ne, fn: ne_65534_int32},
+ {idx: 21, exp: lt, fn: lt_65535_int32},
+ {idx: 21, exp: le, fn: le_65535_int32},
+ {idx: 21, exp: gt, fn: gt_65535_int32},
+ {idx: 21, exp: ge, fn: ge_65535_int32},
+ {idx: 21, exp: eq, fn: eq_65535_int32},
+ {idx: 21, exp: ne, fn: ne_65535_int32},
+ {idx: 22, exp: lt, fn: lt_65536_int32},
+ {idx: 22, exp: le, fn: le_65536_int32},
+ {idx: 22, exp: gt, fn: gt_65536_int32},
+ {idx: 22, exp: ge, fn: ge_65536_int32},
+ {idx: 22, exp: eq, fn: eq_65536_int32},
+ {idx: 22, exp: ne, fn: ne_65536_int32},
+ {idx: 23, exp: lt, fn: lt_2147483646_int32},
+ {idx: 23, exp: le, fn: le_2147483646_int32},
+ {idx: 23, exp: gt, fn: gt_2147483646_int32},
+ {idx: 23, exp: ge, fn: ge_2147483646_int32},
+ {idx: 23, exp: eq, fn: eq_2147483646_int32},
+ {idx: 23, exp: ne, fn: ne_2147483646_int32},
+ {idx: 24, exp: lt, fn: lt_2147483647_int32},
+ {idx: 24, exp: le, fn: le_2147483647_int32},
+ {idx: 24, exp: gt, fn: gt_2147483647_int32},
+ {idx: 24, exp: ge, fn: ge_2147483647_int32},
+ {idx: 24, exp: eq, fn: eq_2147483647_int32},
+ {idx: 24, exp: ne, fn: ne_2147483647_int32},
+}
+
+// int16 tests
+var int16_vals = []int16{
+ -32768,
+ -32767,
+ -129,
+ -128,
+ -127,
+ -1,
+ 0,
+ 1,
+ 126,
+ 127,
+ 128,
+ 254,
+ 255,
+ 256,
+ 32766,
+ 32767,
+}
+
+func lt_neg32768_int16(x int16) bool { return x < -32768 }
+func le_neg32768_int16(x int16) bool { return x <= -32768 }
+func gt_neg32768_int16(x int16) bool { return x > -32768 }
+func ge_neg32768_int16(x int16) bool { return x >= -32768 }
+func eq_neg32768_int16(x int16) bool { return x == -32768 }
+func ne_neg32768_int16(x int16) bool { return x != -32768 }
+func lt_neg32767_int16(x int16) bool { return x < -32767 }
+func le_neg32767_int16(x int16) bool { return x <= -32767 }
+func gt_neg32767_int16(x int16) bool { return x > -32767 }
+func ge_neg32767_int16(x int16) bool { return x >= -32767 }
+func eq_neg32767_int16(x int16) bool { return x == -32767 }
+func ne_neg32767_int16(x int16) bool { return x != -32767 }
+func lt_neg129_int16(x int16) bool { return x < -129 }
+func le_neg129_int16(x int16) bool { return x <= -129 }
+func gt_neg129_int16(x int16) bool { return x > -129 }
+func ge_neg129_int16(x int16) bool { return x >= -129 }
+func eq_neg129_int16(x int16) bool { return x == -129 }
+func ne_neg129_int16(x int16) bool { return x != -129 }
+func lt_neg128_int16(x int16) bool { return x < -128 }
+func le_neg128_int16(x int16) bool { return x <= -128 }
+func gt_neg128_int16(x int16) bool { return x > -128 }
+func ge_neg128_int16(x int16) bool { return x >= -128 }
+func eq_neg128_int16(x int16) bool { return x == -128 }
+func ne_neg128_int16(x int16) bool { return x != -128 }
+func lt_neg127_int16(x int16) bool { return x < -127 }
+func le_neg127_int16(x int16) bool { return x <= -127 }
+func gt_neg127_int16(x int16) bool { return x > -127 }
+func ge_neg127_int16(x int16) bool { return x >= -127 }
+func eq_neg127_int16(x int16) bool { return x == -127 }
+func ne_neg127_int16(x int16) bool { return x != -127 }
+func lt_neg1_int16(x int16) bool { return x < -1 }
+func le_neg1_int16(x int16) bool { return x <= -1 }
+func gt_neg1_int16(x int16) bool { return x > -1 }
+func ge_neg1_int16(x int16) bool { return x >= -1 }
+func eq_neg1_int16(x int16) bool { return x == -1 }
+func ne_neg1_int16(x int16) bool { return x != -1 }
+func lt_0_int16(x int16) bool { return x < 0 }
+func le_0_int16(x int16) bool { return x <= 0 }
+func gt_0_int16(x int16) bool { return x > 0 }
+func ge_0_int16(x int16) bool { return x >= 0 }
+func eq_0_int16(x int16) bool { return x == 0 }
+func ne_0_int16(x int16) bool { return x != 0 }
+func lt_1_int16(x int16) bool { return x < 1 }
+func le_1_int16(x int16) bool { return x <= 1 }
+func gt_1_int16(x int16) bool { return x > 1 }
+func ge_1_int16(x int16) bool { return x >= 1 }
+func eq_1_int16(x int16) bool { return x == 1 }
+func ne_1_int16(x int16) bool { return x != 1 }
+func lt_126_int16(x int16) bool { return x < 126 }
+func le_126_int16(x int16) bool { return x <= 126 }
+func gt_126_int16(x int16) bool { return x > 126 }
+func ge_126_int16(x int16) bool { return x >= 126 }
+func eq_126_int16(x int16) bool { return x == 126 }
+func ne_126_int16(x int16) bool { return x != 126 }
+func lt_127_int16(x int16) bool { return x < 127 }
+func le_127_int16(x int16) bool { return x <= 127 }
+func gt_127_int16(x int16) bool { return x > 127 }
+func ge_127_int16(x int16) bool { return x >= 127 }
+func eq_127_int16(x int16) bool { return x == 127 }
+func ne_127_int16(x int16) bool { return x != 127 }
+func lt_128_int16(x int16) bool { return x < 128 }
+func le_128_int16(x int16) bool { return x <= 128 }
+func gt_128_int16(x int16) bool { return x > 128 }
+func ge_128_int16(x int16) bool { return x >= 128 }
+func eq_128_int16(x int16) bool { return x == 128 }
+func ne_128_int16(x int16) bool { return x != 128 }
+func lt_254_int16(x int16) bool { return x < 254 }
+func le_254_int16(x int16) bool { return x <= 254 }
+func gt_254_int16(x int16) bool { return x > 254 }
+func ge_254_int16(x int16) bool { return x >= 254 }
+func eq_254_int16(x int16) bool { return x == 254 }
+func ne_254_int16(x int16) bool { return x != 254 }
+func lt_255_int16(x int16) bool { return x < 255 }
+func le_255_int16(x int16) bool { return x <= 255 }
+func gt_255_int16(x int16) bool { return x > 255 }
+func ge_255_int16(x int16) bool { return x >= 255 }
+func eq_255_int16(x int16) bool { return x == 255 }
+func ne_255_int16(x int16) bool { return x != 255 }
+func lt_256_int16(x int16) bool { return x < 256 }
+func le_256_int16(x int16) bool { return x <= 256 }
+func gt_256_int16(x int16) bool { return x > 256 }
+func ge_256_int16(x int16) bool { return x >= 256 }
+func eq_256_int16(x int16) bool { return x == 256 }
+func ne_256_int16(x int16) bool { return x != 256 }
+func lt_32766_int16(x int16) bool { return x < 32766 }
+func le_32766_int16(x int16) bool { return x <= 32766 }
+func gt_32766_int16(x int16) bool { return x > 32766 }
+func ge_32766_int16(x int16) bool { return x >= 32766 }
+func eq_32766_int16(x int16) bool { return x == 32766 }
+func ne_32766_int16(x int16) bool { return x != 32766 }
+func lt_32767_int16(x int16) bool { return x < 32767 }
+func le_32767_int16(x int16) bool { return x <= 32767 }
+func gt_32767_int16(x int16) bool { return x > 32767 }
+func ge_32767_int16(x int16) bool { return x >= 32767 }
+func eq_32767_int16(x int16) bool { return x == 32767 }
+func ne_32767_int16(x int16) bool { return x != 32767 }
+
+var int16_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(int16) bool
+}{
+ {idx: 0, exp: lt, fn: lt_neg32768_int16},
+ {idx: 0, exp: le, fn: le_neg32768_int16},
+ {idx: 0, exp: gt, fn: gt_neg32768_int16},
+ {idx: 0, exp: ge, fn: ge_neg32768_int16},
+ {idx: 0, exp: eq, fn: eq_neg32768_int16},
+ {idx: 0, exp: ne, fn: ne_neg32768_int16},
+ {idx: 1, exp: lt, fn: lt_neg32767_int16},
+ {idx: 1, exp: le, fn: le_neg32767_int16},
+ {idx: 1, exp: gt, fn: gt_neg32767_int16},
+ {idx: 1, exp: ge, fn: ge_neg32767_int16},
+ {idx: 1, exp: eq, fn: eq_neg32767_int16},
+ {idx: 1, exp: ne, fn: ne_neg32767_int16},
+ {idx: 2, exp: lt, fn: lt_neg129_int16},
+ {idx: 2, exp: le, fn: le_neg129_int16},
+ {idx: 2, exp: gt, fn: gt_neg129_int16},
+ {idx: 2, exp: ge, fn: ge_neg129_int16},
+ {idx: 2, exp: eq, fn: eq_neg129_int16},
+ {idx: 2, exp: ne, fn: ne_neg129_int16},
+ {idx: 3, exp: lt, fn: lt_neg128_int16},
+ {idx: 3, exp: le, fn: le_neg128_int16},
+ {idx: 3, exp: gt, fn: gt_neg128_int16},
+ {idx: 3, exp: ge, fn: ge_neg128_int16},
+ {idx: 3, exp: eq, fn: eq_neg128_int16},
+ {idx: 3, exp: ne, fn: ne_neg128_int16},
+ {idx: 4, exp: lt, fn: lt_neg127_int16},
+ {idx: 4, exp: le, fn: le_neg127_int16},
+ {idx: 4, exp: gt, fn: gt_neg127_int16},
+ {idx: 4, exp: ge, fn: ge_neg127_int16},
+ {idx: 4, exp: eq, fn: eq_neg127_int16},
+ {idx: 4, exp: ne, fn: ne_neg127_int16},
+ {idx: 5, exp: lt, fn: lt_neg1_int16},
+ {idx: 5, exp: le, fn: le_neg1_int16},
+ {idx: 5, exp: gt, fn: gt_neg1_int16},
+ {idx: 5, exp: ge, fn: ge_neg1_int16},
+ {idx: 5, exp: eq, fn: eq_neg1_int16},
+ {idx: 5, exp: ne, fn: ne_neg1_int16},
+ {idx: 6, exp: lt, fn: lt_0_int16},
+ {idx: 6, exp: le, fn: le_0_int16},
+ {idx: 6, exp: gt, fn: gt_0_int16},
+ {idx: 6, exp: ge, fn: ge_0_int16},
+ {idx: 6, exp: eq, fn: eq_0_int16},
+ {idx: 6, exp: ne, fn: ne_0_int16},
+ {idx: 7, exp: lt, fn: lt_1_int16},
+ {idx: 7, exp: le, fn: le_1_int16},
+ {idx: 7, exp: gt, fn: gt_1_int16},
+ {idx: 7, exp: ge, fn: ge_1_int16},
+ {idx: 7, exp: eq, fn: eq_1_int16},
+ {idx: 7, exp: ne, fn: ne_1_int16},
+ {idx: 8, exp: lt, fn: lt_126_int16},
+ {idx: 8, exp: le, fn: le_126_int16},
+ {idx: 8, exp: gt, fn: gt_126_int16},
+ {idx: 8, exp: ge, fn: ge_126_int16},
+ {idx: 8, exp: eq, fn: eq_126_int16},
+ {idx: 8, exp: ne, fn: ne_126_int16},
+ {idx: 9, exp: lt, fn: lt_127_int16},
+ {idx: 9, exp: le, fn: le_127_int16},
+ {idx: 9, exp: gt, fn: gt_127_int16},
+ {idx: 9, exp: ge, fn: ge_127_int16},
+ {idx: 9, exp: eq, fn: eq_127_int16},
+ {idx: 9, exp: ne, fn: ne_127_int16},
+ {idx: 10, exp: lt, fn: lt_128_int16},
+ {idx: 10, exp: le, fn: le_128_int16},
+ {idx: 10, exp: gt, fn: gt_128_int16},
+ {idx: 10, exp: ge, fn: ge_128_int16},
+ {idx: 10, exp: eq, fn: eq_128_int16},
+ {idx: 10, exp: ne, fn: ne_128_int16},
+ {idx: 11, exp: lt, fn: lt_254_int16},
+ {idx: 11, exp: le, fn: le_254_int16},
+ {idx: 11, exp: gt, fn: gt_254_int16},
+ {idx: 11, exp: ge, fn: ge_254_int16},
+ {idx: 11, exp: eq, fn: eq_254_int16},
+ {idx: 11, exp: ne, fn: ne_254_int16},
+ {idx: 12, exp: lt, fn: lt_255_int16},
+ {idx: 12, exp: le, fn: le_255_int16},
+ {idx: 12, exp: gt, fn: gt_255_int16},
+ {idx: 12, exp: ge, fn: ge_255_int16},
+ {idx: 12, exp: eq, fn: eq_255_int16},
+ {idx: 12, exp: ne, fn: ne_255_int16},
+ {idx: 13, exp: lt, fn: lt_256_int16},
+ {idx: 13, exp: le, fn: le_256_int16},
+ {idx: 13, exp: gt, fn: gt_256_int16},
+ {idx: 13, exp: ge, fn: ge_256_int16},
+ {idx: 13, exp: eq, fn: eq_256_int16},
+ {idx: 13, exp: ne, fn: ne_256_int16},
+ {idx: 14, exp: lt, fn: lt_32766_int16},
+ {idx: 14, exp: le, fn: le_32766_int16},
+ {idx: 14, exp: gt, fn: gt_32766_int16},
+ {idx: 14, exp: ge, fn: ge_32766_int16},
+ {idx: 14, exp: eq, fn: eq_32766_int16},
+ {idx: 14, exp: ne, fn: ne_32766_int16},
+ {idx: 15, exp: lt, fn: lt_32767_int16},
+ {idx: 15, exp: le, fn: le_32767_int16},
+ {idx: 15, exp: gt, fn: gt_32767_int16},
+ {idx: 15, exp: ge, fn: ge_32767_int16},
+ {idx: 15, exp: eq, fn: eq_32767_int16},
+ {idx: 15, exp: ne, fn: ne_32767_int16},
+}
+
+// int8 tests
+var int8_vals = []int8{
+ -128,
+ -127,
+ -1,
+ 0,
+ 1,
+ 126,
+ 127,
+}
+
+func lt_neg128_int8(x int8) bool { return x < -128 }
+func le_neg128_int8(x int8) bool { return x <= -128 }
+func gt_neg128_int8(x int8) bool { return x > -128 }
+func ge_neg128_int8(x int8) bool { return x >= -128 }
+func eq_neg128_int8(x int8) bool { return x == -128 }
+func ne_neg128_int8(x int8) bool { return x != -128 }
+func lt_neg127_int8(x int8) bool { return x < -127 }
+func le_neg127_int8(x int8) bool { return x <= -127 }
+func gt_neg127_int8(x int8) bool { return x > -127 }
+func ge_neg127_int8(x int8) bool { return x >= -127 }
+func eq_neg127_int8(x int8) bool { return x == -127 }
+func ne_neg127_int8(x int8) bool { return x != -127 }
+func lt_neg1_int8(x int8) bool { return x < -1 }
+func le_neg1_int8(x int8) bool { return x <= -1 }
+func gt_neg1_int8(x int8) bool { return x > -1 }
+func ge_neg1_int8(x int8) bool { return x >= -1 }
+func eq_neg1_int8(x int8) bool { return x == -1 }
+func ne_neg1_int8(x int8) bool { return x != -1 }
+func lt_0_int8(x int8) bool { return x < 0 }
+func le_0_int8(x int8) bool { return x <= 0 }
+func gt_0_int8(x int8) bool { return x > 0 }
+func ge_0_int8(x int8) bool { return x >= 0 }
+func eq_0_int8(x int8) bool { return x == 0 }
+func ne_0_int8(x int8) bool { return x != 0 }
+func lt_1_int8(x int8) bool { return x < 1 }
+func le_1_int8(x int8) bool { return x <= 1 }
+func gt_1_int8(x int8) bool { return x > 1 }
+func ge_1_int8(x int8) bool { return x >= 1 }
+func eq_1_int8(x int8) bool { return x == 1 }
+func ne_1_int8(x int8) bool { return x != 1 }
+func lt_126_int8(x int8) bool { return x < 126 }
+func le_126_int8(x int8) bool { return x <= 126 }
+func gt_126_int8(x int8) bool { return x > 126 }
+func ge_126_int8(x int8) bool { return x >= 126 }
+func eq_126_int8(x int8) bool { return x == 126 }
+func ne_126_int8(x int8) bool { return x != 126 }
+func lt_127_int8(x int8) bool { return x < 127 }
+func le_127_int8(x int8) bool { return x <= 127 }
+func gt_127_int8(x int8) bool { return x > 127 }
+func ge_127_int8(x int8) bool { return x >= 127 }
+func eq_127_int8(x int8) bool { return x == 127 }
+func ne_127_int8(x int8) bool { return x != 127 }
+
+var int8_tests = []struct {
+ idx int // index of the constant used
+ exp result // expected results
+ fn func(int8) bool
+}{
+ {idx: 0, exp: lt, fn: lt_neg128_int8},
+ {idx: 0, exp: le, fn: le_neg128_int8},
+ {idx: 0, exp: gt, fn: gt_neg128_int8},
+ {idx: 0, exp: ge, fn: ge_neg128_int8},
+ {idx: 0, exp: eq, fn: eq_neg128_int8},
+ {idx: 0, exp: ne, fn: ne_neg128_int8},
+ {idx: 1, exp: lt, fn: lt_neg127_int8},
+ {idx: 1, exp: le, fn: le_neg127_int8},
+ {idx: 1, exp: gt, fn: gt_neg127_int8},
+ {idx: 1, exp: ge, fn: ge_neg127_int8},
+ {idx: 1, exp: eq, fn: eq_neg127_int8},
+ {idx: 1, exp: ne, fn: ne_neg127_int8},
+ {idx: 2, exp: lt, fn: lt_neg1_int8},
+ {idx: 2, exp: le, fn: le_neg1_int8},
+ {idx: 2, exp: gt, fn: gt_neg1_int8},
+ {idx: 2, exp: ge, fn: ge_neg1_int8},
+ {idx: 2, exp: eq, fn: eq_neg1_int8},
+ {idx: 2, exp: ne, fn: ne_neg1_int8},
+ {idx: 3, exp: lt, fn: lt_0_int8},
+ {idx: 3, exp: le, fn: le_0_int8},
+ {idx: 3, exp: gt, fn: gt_0_int8},
+ {idx: 3, exp: ge, fn: ge_0_int8},
+ {idx: 3, exp: eq, fn: eq_0_int8},
+ {idx: 3, exp: ne, fn: ne_0_int8},
+ {idx: 4, exp: lt, fn: lt_1_int8},
+ {idx: 4, exp: le, fn: le_1_int8},
+ {idx: 4, exp: gt, fn: gt_1_int8},
+ {idx: 4, exp: ge, fn: ge_1_int8},
+ {idx: 4, exp: eq, fn: eq_1_int8},
+ {idx: 4, exp: ne, fn: ne_1_int8},
+ {idx: 5, exp: lt, fn: lt_126_int8},
+ {idx: 5, exp: le, fn: le_126_int8},
+ {idx: 5, exp: gt, fn: gt_126_int8},
+ {idx: 5, exp: ge, fn: ge_126_int8},
+ {idx: 5, exp: eq, fn: eq_126_int8},
+ {idx: 5, exp: ne, fn: ne_126_int8},
+ {idx: 6, exp: lt, fn: lt_127_int8},
+ {idx: 6, exp: le, fn: le_127_int8},
+ {idx: 6, exp: gt, fn: gt_127_int8},
+ {idx: 6, exp: ge, fn: ge_127_int8},
+ {idx: 6, exp: eq, fn: eq_127_int8},
+ {idx: 6, exp: ne, fn: ne_127_int8},
+}
+
+// TestComparisonsConst tests results for comparison operations against constants.
+func TestComparisonsConst(t *testing.T) {
+ for i, test := range uint64_tests {
+ for j, x := range uint64_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=uint64 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range uint32_tests {
+ for j, x := range uint32_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=uint32 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range uint16_tests {
+ for j, x := range uint16_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=uint16 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range uint8_tests {
+ for j, x := range uint8_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=uint8 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range int64_tests {
+ for j, x := range int64_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=int64 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range int32_tests {
+ for j, x := range int32_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=int32 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range int16_tests {
+ for j, x := range int16_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=int16 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+ for i, test := range int8_tests {
+ for j, x := range int8_vals {
+ want := test.exp.l
+ if j == test.idx {
+ want = test.exp.e
+ } else if j > test.idx {
+ want = test.exp.r
+ }
+ if test.fn(x) != want {
+ fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()
+ t.Errorf("test failed: %v(%v) != %v [type=int8 i=%v j=%v idx=%v]", fn, x, want, i, j, test.idx)
+ }
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/cmp_test.go b/src/cmd/compile/internal/test/testdata/cmp_test.go
new file mode 100644
index 0000000..06b58f2
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/cmp_test.go
@@ -0,0 +1,37 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// cmp_ssa.go tests compare simplification operations.
+package main
+
+import "testing"
+
+//go:noinline
+func eq_ssa(a int64) bool {
+ return 4+a == 10
+}
+
+//go:noinline
+func neq_ssa(a int64) bool {
+ return 10 != a+4
+}
+
+func testCmp(t *testing.T) {
+ if wanted, got := true, eq_ssa(6); wanted != got {
+ t.Errorf("eq_ssa: expected %v, got %v\n", wanted, got)
+ }
+ if wanted, got := false, eq_ssa(7); wanted != got {
+ t.Errorf("eq_ssa: expected %v, got %v\n", wanted, got)
+ }
+ if wanted, got := false, neq_ssa(6); wanted != got {
+ t.Errorf("neq_ssa: expected %v, got %v\n", wanted, got)
+ }
+ if wanted, got := true, neq_ssa(7); wanted != got {
+ t.Errorf("neq_ssa: expected %v, got %v\n", wanted, got)
+ }
+}
+
+func TestCmp(t *testing.T) {
+ testCmp(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/compound_test.go b/src/cmd/compile/internal/test/testdata/compound_test.go
new file mode 100644
index 0000000..4ae464d
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/compound_test.go
@@ -0,0 +1,128 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test compound objects
+
+package main
+
+import (
+ "testing"
+)
+
+func string_ssa(a, b string, x bool) string {
+ s := ""
+ if x {
+ s = a
+ } else {
+ s = b
+ }
+ return s
+}
+
+func testString(t *testing.T) {
+ a := "foo"
+ b := "barz"
+ if want, got := a, string_ssa(a, b, true); got != want {
+ t.Errorf("string_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+ if want, got := b, string_ssa(a, b, false); got != want {
+ t.Errorf("string_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want)
+ }
+}
+
+//go:noinline
+func complex64_ssa(a, b complex64, x bool) complex64 {
+ var c complex64
+ if x {
+ c = a
+ } else {
+ c = b
+ }
+ return c
+}
+
+//go:noinline
+func complex128_ssa(a, b complex128, x bool) complex128 {
+ var c complex128
+ if x {
+ c = a
+ } else {
+ c = b
+ }
+ return c
+}
+
+func testComplex64(t *testing.T) {
+ var a complex64 = 1 + 2i
+ var b complex64 = 3 + 4i
+
+ if want, got := a, complex64_ssa(a, b, true); got != want {
+ t.Errorf("complex64_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+ if want, got := b, complex64_ssa(a, b, false); got != want {
+ t.Errorf("complex64_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+}
+
+func testComplex128(t *testing.T) {
+ var a complex128 = 1 + 2i
+ var b complex128 = 3 + 4i
+
+ if want, got := a, complex128_ssa(a, b, true); got != want {
+ t.Errorf("complex128_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+ if want, got := b, complex128_ssa(a, b, false); got != want {
+ t.Errorf("complex128_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+}
+
+func slice_ssa(a, b []byte, x bool) []byte {
+ var s []byte
+ if x {
+ s = a
+ } else {
+ s = b
+ }
+ return s
+}
+
+func testSlice(t *testing.T) {
+ a := []byte{3, 4, 5}
+ b := []byte{7, 8, 9}
+ if want, got := byte(3), slice_ssa(a, b, true)[0]; got != want {
+ t.Errorf("slice_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+ if want, got := byte(7), slice_ssa(a, b, false)[0]; got != want {
+ t.Errorf("slice_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want)
+ }
+}
+
+func interface_ssa(a, b interface{}, x bool) interface{} {
+ var s interface{}
+ if x {
+ s = a
+ } else {
+ s = b
+ }
+ return s
+}
+
+func testInterface(t *testing.T) {
+ a := interface{}(3)
+ b := interface{}(4)
+ if want, got := 3, interface_ssa(a, b, true).(int); got != want {
+ t.Errorf("interface_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
+ }
+ if want, got := 4, interface_ssa(a, b, false).(int); got != want {
+ t.Errorf("interface_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want)
+ }
+}
+
+func TestCompound(t *testing.T) {
+ testString(t)
+ testSlice(t)
+ testInterface(t)
+ testComplex64(t)
+ testComplex128(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/copy_test.go b/src/cmd/compile/internal/test/testdata/copy_test.go
new file mode 100644
index 0000000..c29611d
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/copy_test.go
@@ -0,0 +1,760 @@
+// Code generated by gen/copyGen.go. DO NOT EDIT.
+
+package main
+
+import "testing"
+
+type T1 struct {
+ pre [8]byte
+ mid [1]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1copy_ssa(y, x *[1]byte) {
+ *y = *x
+}
+func testCopy1(t *testing.T) {
+ a := T1{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1]byte{0}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1]byte{100}
+ t1copy_ssa(&a.mid, &x)
+ want := T1{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1]byte{100}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T2 struct {
+ pre [8]byte
+ mid [2]byte
+ post [8]byte
+}
+
+//go:noinline
+func t2copy_ssa(y, x *[2]byte) {
+ *y = *x
+}
+func testCopy2(t *testing.T) {
+ a := T2{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [2]byte{0, 1}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [2]byte{100, 101}
+ t2copy_ssa(&a.mid, &x)
+ want := T2{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [2]byte{100, 101}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t2copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T3 struct {
+ pre [8]byte
+ mid [3]byte
+ post [8]byte
+}
+
+//go:noinline
+func t3copy_ssa(y, x *[3]byte) {
+ *y = *x
+}
+func testCopy3(t *testing.T) {
+ a := T3{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [3]byte{0, 1, 2}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [3]byte{100, 101, 102}
+ t3copy_ssa(&a.mid, &x)
+ want := T3{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [3]byte{100, 101, 102}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t3copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T4 struct {
+ pre [8]byte
+ mid [4]byte
+ post [8]byte
+}
+
+//go:noinline
+func t4copy_ssa(y, x *[4]byte) {
+ *y = *x
+}
+func testCopy4(t *testing.T) {
+ a := T4{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [4]byte{0, 1, 2, 3}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [4]byte{100, 101, 102, 103}
+ t4copy_ssa(&a.mid, &x)
+ want := T4{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [4]byte{100, 101, 102, 103}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t4copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T5 struct {
+ pre [8]byte
+ mid [5]byte
+ post [8]byte
+}
+
+//go:noinline
+func t5copy_ssa(y, x *[5]byte) {
+ *y = *x
+}
+func testCopy5(t *testing.T) {
+ a := T5{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [5]byte{0, 1, 2, 3, 4}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [5]byte{100, 101, 102, 103, 104}
+ t5copy_ssa(&a.mid, &x)
+ want := T5{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [5]byte{100, 101, 102, 103, 104}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t5copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T6 struct {
+ pre [8]byte
+ mid [6]byte
+ post [8]byte
+}
+
+//go:noinline
+func t6copy_ssa(y, x *[6]byte) {
+ *y = *x
+}
+func testCopy6(t *testing.T) {
+ a := T6{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [6]byte{0, 1, 2, 3, 4, 5}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [6]byte{100, 101, 102, 103, 104, 105}
+ t6copy_ssa(&a.mid, &x)
+ want := T6{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [6]byte{100, 101, 102, 103, 104, 105}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t6copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T7 struct {
+ pre [8]byte
+ mid [7]byte
+ post [8]byte
+}
+
+//go:noinline
+func t7copy_ssa(y, x *[7]byte) {
+ *y = *x
+}
+func testCopy7(t *testing.T) {
+ a := T7{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [7]byte{0, 1, 2, 3, 4, 5, 6}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [7]byte{100, 101, 102, 103, 104, 105, 106}
+ t7copy_ssa(&a.mid, &x)
+ want := T7{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [7]byte{100, 101, 102, 103, 104, 105, 106}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t7copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T8 struct {
+ pre [8]byte
+ mid [8]byte
+ post [8]byte
+}
+
+//go:noinline
+func t8copy_ssa(y, x *[8]byte) {
+ *y = *x
+}
+func testCopy8(t *testing.T) {
+ a := T8{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [8]byte{0, 1, 2, 3, 4, 5, 6, 7}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [8]byte{100, 101, 102, 103, 104, 105, 106, 107}
+ t8copy_ssa(&a.mid, &x)
+ want := T8{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [8]byte{100, 101, 102, 103, 104, 105, 106, 107}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t8copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T9 struct {
+ pre [8]byte
+ mid [9]byte
+ post [8]byte
+}
+
+//go:noinline
+func t9copy_ssa(y, x *[9]byte) {
+ *y = *x
+}
+func testCopy9(t *testing.T) {
+ a := T9{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [9]byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [9]byte{100, 101, 102, 103, 104, 105, 106, 107, 108}
+ t9copy_ssa(&a.mid, &x)
+ want := T9{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [9]byte{100, 101, 102, 103, 104, 105, 106, 107, 108}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t9copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T10 struct {
+ pre [8]byte
+ mid [10]byte
+ post [8]byte
+}
+
+//go:noinline
+func t10copy_ssa(y, x *[10]byte) {
+ *y = *x
+}
+func testCopy10(t *testing.T) {
+ a := T10{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [10]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [10]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109}
+ t10copy_ssa(&a.mid, &x)
+ want := T10{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [10]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t10copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T15 struct {
+ pre [8]byte
+ mid [15]byte
+ post [8]byte
+}
+
+//go:noinline
+func t15copy_ssa(y, x *[15]byte) {
+ *y = *x
+}
+func testCopy15(t *testing.T) {
+ a := T15{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [15]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [15]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114}
+ t15copy_ssa(&a.mid, &x)
+ want := T15{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [15]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t15copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T16 struct {
+ pre [8]byte
+ mid [16]byte
+ post [8]byte
+}
+
+//go:noinline
+func t16copy_ssa(y, x *[16]byte) {
+ *y = *x
+}
+func testCopy16(t *testing.T) {
+ a := T16{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [16]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115}
+ t16copy_ssa(&a.mid, &x)
+ want := T16{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [16]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t16copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T17 struct {
+ pre [8]byte
+ mid [17]byte
+ post [8]byte
+}
+
+//go:noinline
+func t17copy_ssa(y, x *[17]byte) {
+ *y = *x
+}
+func testCopy17(t *testing.T) {
+ a := T17{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [17]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [17]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116}
+ t17copy_ssa(&a.mid, &x)
+ want := T17{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [17]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t17copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T23 struct {
+ pre [8]byte
+ mid [23]byte
+ post [8]byte
+}
+
+//go:noinline
+func t23copy_ssa(y, x *[23]byte) {
+ *y = *x
+}
+func testCopy23(t *testing.T) {
+ a := T23{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [23]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [23]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}
+ t23copy_ssa(&a.mid, &x)
+ want := T23{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [23]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t23copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T24 struct {
+ pre [8]byte
+ mid [24]byte
+ post [8]byte
+}
+
+//go:noinline
+func t24copy_ssa(y, x *[24]byte) {
+ *y = *x
+}
+func testCopy24(t *testing.T) {
+ a := T24{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [24]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [24]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123}
+ t24copy_ssa(&a.mid, &x)
+ want := T24{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [24]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t24copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T25 struct {
+ pre [8]byte
+ mid [25]byte
+ post [8]byte
+}
+
+//go:noinline
+func t25copy_ssa(y, x *[25]byte) {
+ *y = *x
+}
+func testCopy25(t *testing.T) {
+ a := T25{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [25]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [25]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124}
+ t25copy_ssa(&a.mid, &x)
+ want := T25{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [25]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t25copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T31 struct {
+ pre [8]byte
+ mid [31]byte
+ post [8]byte
+}
+
+//go:noinline
+func t31copy_ssa(y, x *[31]byte) {
+ *y = *x
+}
+func testCopy31(t *testing.T) {
+ a := T31{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [31]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [31]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130}
+ t31copy_ssa(&a.mid, &x)
+ want := T31{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [31]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t31copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T32 struct {
+ pre [8]byte
+ mid [32]byte
+ post [8]byte
+}
+
+//go:noinline
+func t32copy_ssa(y, x *[32]byte) {
+ *y = *x
+}
+func testCopy32(t *testing.T) {
+ a := T32{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [32]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [32]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131}
+ t32copy_ssa(&a.mid, &x)
+ want := T32{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [32]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t32copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T33 struct {
+ pre [8]byte
+ mid [33]byte
+ post [8]byte
+}
+
+//go:noinline
+func t33copy_ssa(y, x *[33]byte) {
+ *y = *x
+}
+func testCopy33(t *testing.T) {
+ a := T33{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [33]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [33]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132}
+ t33copy_ssa(&a.mid, &x)
+ want := T33{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [33]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t33copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T63 struct {
+ pre [8]byte
+ mid [63]byte
+ post [8]byte
+}
+
+//go:noinline
+func t63copy_ssa(y, x *[63]byte) {
+ *y = *x
+}
+func testCopy63(t *testing.T) {
+ a := T63{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [63]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [63]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162}
+ t63copy_ssa(&a.mid, &x)
+ want := T63{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [63]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t63copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T64 struct {
+ pre [8]byte
+ mid [64]byte
+ post [8]byte
+}
+
+//go:noinline
+func t64copy_ssa(y, x *[64]byte) {
+ *y = *x
+}
+func testCopy64(t *testing.T) {
+ a := T64{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [64]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [64]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163}
+ t64copy_ssa(&a.mid, &x)
+ want := T64{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [64]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t64copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T65 struct {
+ pre [8]byte
+ mid [65]byte
+ post [8]byte
+}
+
+//go:noinline
+func t65copy_ssa(y, x *[65]byte) {
+ *y = *x
+}
+func testCopy65(t *testing.T) {
+ a := T65{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [65]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [65]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164}
+ t65copy_ssa(&a.mid, &x)
+ want := T65{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [65]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t65copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1023 struct {
+ pre [8]byte
+ mid [1023]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1023copy_ssa(y, x *[1023]byte) {
+ *y = *x
+}
+func testCopy1023(t *testing.T) {
+ a := T1023{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1023]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1023]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}
+ t1023copy_ssa(&a.mid, &x)
+ want := T1023{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1023]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1023copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1024 struct {
+ pre [8]byte
+ mid [1024]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1024copy_ssa(y, x *[1024]byte) {
+ *y = *x
+}
+func testCopy1024(t *testing.T) {
+ a := T1024{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1024]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1024]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123}
+ t1024copy_ssa(&a.mid, &x)
+ want := T1024{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1024]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1024copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1025 struct {
+ pre [8]byte
+ mid [1025]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1025copy_ssa(y, x *[1025]byte) {
+ *y = *x
+}
+func testCopy1025(t *testing.T) {
+ a := T1025{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1025]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1025]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124}
+ t1025copy_ssa(&a.mid, &x)
+ want := T1025{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1025]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1025copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1031 struct {
+ pre [8]byte
+ mid [1031]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1031copy_ssa(y, x *[1031]byte) {
+ *y = *x
+}
+func testCopy1031(t *testing.T) {
+ a := T1031{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1031]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1031]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130}
+ t1031copy_ssa(&a.mid, &x)
+ want := T1031{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1031]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1031copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1032 struct {
+ pre [8]byte
+ mid [1032]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1032copy_ssa(y, x *[1032]byte) {
+ *y = *x
+}
+func testCopy1032(t *testing.T) {
+ a := T1032{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1032]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1032]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131}
+ t1032copy_ssa(&a.mid, &x)
+ want := T1032{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1032]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1032copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1033 struct {
+ pre [8]byte
+ mid [1033]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1033copy_ssa(y, x *[1033]byte) {
+ *y = *x
+}
+func testCopy1033(t *testing.T) {
+ a := T1033{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1033]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1033]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132}
+ t1033copy_ssa(&a.mid, &x)
+ want := T1033{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1033]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1033copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1039 struct {
+ pre [8]byte
+ mid [1039]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1039copy_ssa(y, x *[1039]byte) {
+ *y = *x
+}
+func testCopy1039(t *testing.T) {
+ a := T1039{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1039]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1039]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138}
+ t1039copy_ssa(&a.mid, &x)
+ want := T1039{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1039]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1039copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1040 struct {
+ pre [8]byte
+ mid [1040]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1040copy_ssa(y, x *[1040]byte) {
+ *y = *x
+}
+func testCopy1040(t *testing.T) {
+ a := T1040{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1040]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1040]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139}
+ t1040copy_ssa(&a.mid, &x)
+ want := T1040{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1040]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1040copy got=%v, want %v\n", a, want)
+ }
+}
+
+type T1041 struct {
+ pre [8]byte
+ mid [1041]byte
+ post [8]byte
+}
+
+//go:noinline
+func t1041copy_ssa(y, x *[1041]byte) {
+ *y = *x
+}
+func testCopy1041(t *testing.T) {
+ a := T1041{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1041]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ x := [1041]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140}
+ t1041copy_ssa(&a.mid, &x)
+ want := T1041{[8]byte{201, 202, 203, 204, 205, 206, 207, 208}, [1041]byte{100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140}, [8]byte{211, 212, 213, 214, 215, 216, 217, 218}}
+ if a != want {
+ t.Errorf("t1041copy got=%v, want %v\n", a, want)
+ }
+}
+
+//go:noinline
+func tu2copy_ssa(docopy bool, data [2]byte, x *[2]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy2(t *testing.T) {
+ var a [2]byte
+ t2 := [2]byte{2, 3}
+ tu2copy_ssa(true, t2, &a)
+ want2 := [2]byte{2, 3}
+ if a != want2 {
+ t.Errorf("tu2copy got=%v, want %v\n", a, want2)
+ }
+}
+
+//go:noinline
+func tu3copy_ssa(docopy bool, data [3]byte, x *[3]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy3(t *testing.T) {
+ var a [3]byte
+ t3 := [3]byte{3, 4, 5}
+ tu3copy_ssa(true, t3, &a)
+ want3 := [3]byte{3, 4, 5}
+ if a != want3 {
+ t.Errorf("tu3copy got=%v, want %v\n", a, want3)
+ }
+}
+
+//go:noinline
+func tu4copy_ssa(docopy bool, data [4]byte, x *[4]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy4(t *testing.T) {
+ var a [4]byte
+ t4 := [4]byte{4, 5, 6, 7}
+ tu4copy_ssa(true, t4, &a)
+ want4 := [4]byte{4, 5, 6, 7}
+ if a != want4 {
+ t.Errorf("tu4copy got=%v, want %v\n", a, want4)
+ }
+}
+
+//go:noinline
+func tu5copy_ssa(docopy bool, data [5]byte, x *[5]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy5(t *testing.T) {
+ var a [5]byte
+ t5 := [5]byte{5, 6, 7, 8, 9}
+ tu5copy_ssa(true, t5, &a)
+ want5 := [5]byte{5, 6, 7, 8, 9}
+ if a != want5 {
+ t.Errorf("tu5copy got=%v, want %v\n", a, want5)
+ }
+}
+
+//go:noinline
+func tu6copy_ssa(docopy bool, data [6]byte, x *[6]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy6(t *testing.T) {
+ var a [6]byte
+ t6 := [6]byte{6, 7, 8, 9, 10, 11}
+ tu6copy_ssa(true, t6, &a)
+ want6 := [6]byte{6, 7, 8, 9, 10, 11}
+ if a != want6 {
+ t.Errorf("tu6copy got=%v, want %v\n", a, want6)
+ }
+}
+
+//go:noinline
+func tu7copy_ssa(docopy bool, data [7]byte, x *[7]byte) {
+ if docopy {
+ *x = data
+ }
+}
+func testUnalignedCopy7(t *testing.T) {
+ var a [7]byte
+ t7 := [7]byte{7, 8, 9, 10, 11, 12, 13}
+ tu7copy_ssa(true, t7, &a)
+ want7 := [7]byte{7, 8, 9, 10, 11, 12, 13}
+ if a != want7 {
+ t.Errorf("tu7copy got=%v, want %v\n", a, want7)
+ }
+}
+func TestCopy(t *testing.T) {
+ testCopy1(t)
+ testCopy2(t)
+ testCopy3(t)
+ testCopy4(t)
+ testCopy5(t)
+ testCopy6(t)
+ testCopy7(t)
+ testCopy8(t)
+ testCopy9(t)
+ testCopy10(t)
+ testCopy15(t)
+ testCopy16(t)
+ testCopy17(t)
+ testCopy23(t)
+ testCopy24(t)
+ testCopy25(t)
+ testCopy31(t)
+ testCopy32(t)
+ testCopy33(t)
+ testCopy63(t)
+ testCopy64(t)
+ testCopy65(t)
+ testCopy1023(t)
+ testCopy1024(t)
+ testCopy1025(t)
+ testCopy1031(t)
+ testCopy1032(t)
+ testCopy1033(t)
+ testCopy1039(t)
+ testCopy1040(t)
+ testCopy1041(t)
+ testUnalignedCopy2(t)
+ testUnalignedCopy3(t)
+ testUnalignedCopy4(t)
+ testUnalignedCopy5(t)
+ testUnalignedCopy6(t)
+ testUnalignedCopy7(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/ctl_test.go b/src/cmd/compile/internal/test/testdata/ctl_test.go
new file mode 100644
index 0000000..ff3a160
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/ctl_test.go
@@ -0,0 +1,150 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test control flow
+
+package main
+
+import "testing"
+
+// nor_ssa calculates NOR(a, b).
+// It is implemented in a way that generates
+// phi control values.
+func nor_ssa(a, b bool) bool {
+ var c bool
+ if a {
+ c = true
+ }
+ if b {
+ c = true
+ }
+ if c {
+ return false
+ }
+ return true
+}
+
+func testPhiControl(t *testing.T) {
+ tests := [...][3]bool{ // a, b, want
+ {false, false, true},
+ {true, false, false},
+ {false, true, false},
+ {true, true, false},
+ }
+ for _, test := range tests {
+ a, b := test[0], test[1]
+ got := nor_ssa(a, b)
+ want := test[2]
+ if want != got {
+ t.Errorf("nor(%t, %t)=%t got %t", a, b, want, got)
+ }
+ }
+}
+
+func emptyRange_ssa(b []byte) bool {
+ for _, x := range b {
+ _ = x
+ }
+ return true
+}
+
+func testEmptyRange(t *testing.T) {
+ if !emptyRange_ssa([]byte{}) {
+ t.Errorf("emptyRange_ssa([]byte{})=false, want true")
+ }
+}
+
+func switch_ssa(a int) int {
+ ret := 0
+ switch a {
+ case 5:
+ ret += 5
+ case 4:
+ ret += 4
+ case 3:
+ ret += 3
+ case 2:
+ ret += 2
+ case 1:
+ ret += 1
+ }
+ return ret
+
+}
+
+func fallthrough_ssa(a int) int {
+ ret := 0
+ switch a {
+ case 5:
+ ret++
+ fallthrough
+ case 4:
+ ret++
+ fallthrough
+ case 3:
+ ret++
+ fallthrough
+ case 2:
+ ret++
+ fallthrough
+ case 1:
+ ret++
+ }
+ return ret
+
+}
+
+func testFallthrough(t *testing.T) {
+ for i := 0; i < 6; i++ {
+ if got := fallthrough_ssa(i); got != i {
+ t.Errorf("fallthrough_ssa(i) = %d, wanted %d", got, i)
+ }
+ }
+}
+
+func testSwitch(t *testing.T) {
+ for i := 0; i < 6; i++ {
+ if got := switch_ssa(i); got != i {
+ t.Errorf("switch_ssa(i) = %d, wanted %d", got, i)
+ }
+ }
+}
+
+type junk struct {
+ step int
+}
+
+// flagOverwrite_ssa is intended to reproduce an issue seen where a XOR
+// was scheduled between a compare and branch, clearing flags.
+//
+//go:noinline
+func flagOverwrite_ssa(s *junk, c int) int {
+ if '0' <= c && c <= '9' {
+ s.step = 0
+ return 1
+ }
+ if c == 'e' || c == 'E' {
+ s.step = 0
+ return 2
+ }
+ s.step = 0
+ return 3
+}
+
+func testFlagOverwrite(t *testing.T) {
+ j := junk{}
+ if got := flagOverwrite_ssa(&j, ' '); got != 3 {
+ t.Errorf("flagOverwrite_ssa = %d, wanted 3", got)
+ }
+}
+
+func TestCtl(t *testing.T) {
+ testPhiControl(t)
+ testEmptyRange(t)
+
+ testSwitch(t)
+ testFallthrough(t)
+
+ testFlagOverwrite(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/deferNoReturn_test.go b/src/cmd/compile/internal/test/testdata/deferNoReturn_test.go
new file mode 100644
index 0000000..308e897
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/deferNoReturn_test.go
@@ -0,0 +1,21 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that a defer in a function with no return
+// statement will compile correctly.
+
+package main
+
+import "testing"
+
+func deferNoReturn_ssa() {
+ defer func() { println("returned") }()
+ for {
+ println("loop")
+ }
+}
+
+func TestDeferNoReturn(t *testing.T) {
+ // This is a compile-time test, no runtime testing required.
+}
diff --git a/src/cmd/compile/internal/test/testdata/divbyzero_test.go b/src/cmd/compile/internal/test/testdata/divbyzero_test.go
new file mode 100644
index 0000000..ee848b3
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/divbyzero_test.go
@@ -0,0 +1,48 @@
+package main
+
+import (
+ "runtime"
+ "testing"
+)
+
+func checkDivByZero(f func()) (divByZero bool) {
+ defer func() {
+ if r := recover(); r != nil {
+ if e, ok := r.(runtime.Error); ok && e.Error() == "runtime error: integer divide by zero" {
+ divByZero = true
+ }
+ }
+ }()
+ f()
+ return false
+}
+
+//go:noinline
+func div_a(i uint, s []int) int {
+ return s[i%uint(len(s))]
+}
+
+//go:noinline
+func div_b(i uint, j uint) uint {
+ return i / j
+}
+
+//go:noinline
+func div_c(i int) int {
+ return 7 / (i - i)
+}
+
+func TestDivByZero(t *testing.T) {
+ if got := checkDivByZero(func() { div_b(7, 0) }); !got {
+ t.Errorf("expected div by zero for b(7, 0), got no error\n")
+ }
+ if got := checkDivByZero(func() { div_b(7, 7) }); got {
+ t.Errorf("expected no error for b(7, 7), got div by zero\n")
+ }
+ if got := checkDivByZero(func() { div_a(4, nil) }); !got {
+ t.Errorf("expected div by zero for a(4, nil), got no error\n")
+ }
+ if got := checkDivByZero(func() { div_c(5) }); !got {
+ t.Errorf("expected div by zero for c(5), got no error\n")
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/dupLoad_test.go b/src/cmd/compile/internal/test/testdata/dupLoad_test.go
new file mode 100644
index 0000000..d859123
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/dupLoad_test.go
@@ -0,0 +1,83 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This test makes sure that we don't split a single
+// load up into two separate loads.
+
+package main
+
+import "testing"
+
+//go:noinline
+func read1(b []byte) (uint16, uint16) {
+ // There is only a single read of b[0]. The two
+ // returned values must have the same low byte.
+ v := b[0]
+ return uint16(v), uint16(v) | uint16(b[1])<<8
+}
+
+func main1(t *testing.T) {
+ const N = 100000
+ done := make(chan bool, 2)
+ b := make([]byte, 2)
+ go func() {
+ for i := 0; i < N; i++ {
+ b[0] = byte(i)
+ b[1] = byte(i)
+ }
+ done <- true
+ }()
+ go func() {
+ for i := 0; i < N; i++ {
+ x, y := read1(b)
+ if byte(x) != byte(y) {
+ t.Errorf("x=%x y=%x\n", x, y)
+ done <- false
+ return
+ }
+ }
+ done <- true
+ }()
+ <-done
+ <-done
+}
+
+//go:noinline
+func read2(b []byte) (uint16, uint16) {
+ // There is only a single read of b[1]. The two
+ // returned values must have the same high byte.
+ v := uint16(b[1]) << 8
+ return v, uint16(b[0]) | v
+}
+
+func main2(t *testing.T) {
+ const N = 100000
+ done := make(chan bool, 2)
+ b := make([]byte, 2)
+ go func() {
+ for i := 0; i < N; i++ {
+ b[0] = byte(i)
+ b[1] = byte(i)
+ }
+ done <- true
+ }()
+ go func() {
+ for i := 0; i < N; i++ {
+ x, y := read2(b)
+ if x&0xff00 != y&0xff00 {
+ t.Errorf("x=%x y=%x\n", x, y)
+ done <- false
+ return
+ }
+ }
+ done <- true
+ }()
+ <-done
+ <-done
+}
+
+func TestDupLoad(t *testing.T) {
+ main1(t)
+ main2(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/flowgraph_generator1.go b/src/cmd/compile/internal/test/testdata/flowgraph_generator1.go
new file mode 100644
index 0000000..ad22601
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/flowgraph_generator1.go
@@ -0,0 +1,315 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "strings"
+)
+
+// make fake flow graph.
+
+// The blocks of the flow graph are designated with letters A
+// through Z, always including A (start block) and Z (exit
+// block) The specification of a flow graph is a comma-
+// separated list of block successor words, for blocks ordered
+// A, B, C etc, where each block except Z has one or two
+// successors, and any block except A can be a target. Within
+// the generated code, each block with two successors includes
+// a conditional testing x & 1 != 0 (x is the input parameter
+// to the generated function) and also unconditionally shifts x
+// right by one, so that different inputs generate different
+// execution paths, including loops. Every block inverts a
+// global binary to ensure it is not empty. For a flow graph
+// with J words (J+1 blocks), a J-1 bit serial number specifies
+// which blocks (not including A and Z) include an increment of
+// the return variable y by increasing powers of 10, and a
+// different version of the test function is created for each
+// of the 2-to-the-(J-1) serial numbers.
+
+// For each generated function a compact summary is also
+// created so that the generated function can be simulated
+// with a simple interpreter to sanity check the behavior of
+// the compiled code.
+
+// For example:
+
+// func BC_CD_BE_BZ_CZ101(x int64) int64 {
+// y := int64(0)
+// var b int64
+// _ = b
+// b = x & 1
+// x = x >> 1
+// if b != 0 {
+// goto C
+// }
+// goto B
+// B:
+// glob_ = !glob_
+// y += 1
+// b = x & 1
+// x = x >> 1
+// if b != 0 {
+// goto D
+// }
+// goto C
+// C:
+// glob_ = !glob_
+// // no y increment
+// b = x & 1
+// x = x >> 1
+// if b != 0 {
+// goto E
+// }
+// goto B
+// D:
+// glob_ = !glob_
+// y += 10
+// b = x & 1
+// x = x >> 1
+// if b != 0 {
+// goto Z
+// }
+// goto B
+// E:
+// glob_ = !glob_
+// // no y increment
+// b = x & 1
+// x = x >> 1
+// if b != 0 {
+// goto Z
+// }
+// goto C
+// Z:
+// return y
+// }
+
+// {f:BC_CD_BE_BZ_CZ101,
+// maxin:32, blocks:[]blo{
+// blo{inc:0, cond:true, succs:[2]int64{1, 2}},
+// blo{inc:1, cond:true, succs:[2]int64{2, 3}},
+// blo{inc:0, cond:true, succs:[2]int64{1, 4}},
+// blo{inc:10, cond:true, succs:[2]int64{1, 25}},
+// blo{inc:0, cond:true, succs:[2]int64{2, 25}},}},
+
+var labels string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+
+func blocks(spec string) (blocks []string, fnameBase string) {
+ spec = strings.ToUpper(spec)
+ blocks = strings.Split(spec, ",")
+ fnameBase = strings.Replace(spec, ",", "_", -1)
+ return
+}
+
+func makeFunctionFromFlowGraph(blocks []blo, fname string) string {
+ s := ""
+
+ for j := range blocks {
+ // begin block
+ if j == 0 {
+ // block A, implicit label
+ s += `
+func ` + fname + `(x int64) int64 {
+ y := int64(0)
+ var b int64
+ _ = b`
+ } else {
+ // block B,C, etc, explicit label w/ conditional increment
+ l := labels[j : j+1]
+ yeq := `
+ // no y increment`
+ if blocks[j].inc != 0 {
+ yeq = `
+ y += ` + fmt.Sprintf("%d", blocks[j].inc)
+ }
+
+ s += `
+` + l + `:
+ glob = !glob` + yeq
+ }
+
+ // edges to successors
+ if blocks[j].cond { // conditionally branch to second successor
+ s += `
+ b = x & 1
+ x = x >> 1
+ if b != 0 {` + `
+ goto ` + string(labels[blocks[j].succs[1]]) + `
+ }`
+
+ }
+ // branch to first successor
+ s += `
+ goto ` + string(labels[blocks[j].succs[0]])
+ }
+
+ // end block (Z)
+ s += `
+Z:
+ return y
+}
+`
+ return s
+}
+
+var graphs []string = []string{
+ "Z", "BZ,Z", "B,BZ", "BZ,BZ",
+ "ZB,Z", "B,ZB", "ZB,BZ", "ZB,ZB",
+
+ "BC,C,Z", "BC,BC,Z", "BC,BC,BZ",
+ "BC,Z,Z", "BC,ZC,Z", "BC,ZC,BZ",
+ "BZ,C,Z", "BZ,BC,Z", "BZ,CZ,Z",
+ "BZ,C,BZ", "BZ,BC,BZ", "BZ,CZ,BZ",
+ "BZ,C,CZ", "BZ,BC,CZ", "BZ,CZ,CZ",
+
+ "BC,CD,BE,BZ,CZ",
+ "BC,BD,CE,CZ,BZ",
+ "BC,BD,CE,FZ,GZ,F,G",
+ "BC,BD,CE,FZ,GZ,G,F",
+
+ "BC,DE,BE,FZ,FZ,Z",
+ "BC,DE,BE,FZ,ZF,Z",
+ "BC,DE,BE,ZF,FZ,Z",
+ "BC,DE,EB,FZ,FZ,Z",
+ "BC,ED,BE,FZ,FZ,Z",
+ "CB,DE,BE,FZ,FZ,Z",
+
+ "CB,ED,BE,FZ,FZ,Z",
+ "BC,ED,EB,FZ,ZF,Z",
+ "CB,DE,EB,ZF,FZ,Z",
+ "CB,ED,EB,FZ,FZ,Z",
+
+ "BZ,CD,CD,CE,BZ",
+ "EC,DF,FG,ZC,GB,BE,FD",
+ "BH,CF,DG,HE,BF,CG,DH,BZ",
+}
+
+// blo describes a block in the generated/interpreted code
+type blo struct {
+ inc int64 // increment amount
+ cond bool // block ends in conditional
+ succs [2]int64
+}
+
+// strings2blocks converts a slice of strings specifying
+// successors into a slice of blo encoding the blocks in a
+// common form easy to execute or interpret.
+func strings2blocks(blocks []string, fname string, i int) (bs []blo, cond uint) {
+ bs = make([]blo, len(blocks))
+ edge := int64(1)
+ cond = 0
+ k := uint(0)
+ for j, s := range blocks {
+ if j == 0 {
+ } else {
+ if (i>>k)&1 != 0 {
+ bs[j].inc = edge
+ edge *= 10
+ }
+ k++
+ }
+ if len(s) > 1 {
+ bs[j].succs[1] = int64(blocks[j][1] - 'A')
+ bs[j].cond = true
+ cond++
+ }
+ bs[j].succs[0] = int64(blocks[j][0] - 'A')
+ }
+ return bs, cond
+}
+
+// fmtBlocks writes out the blocks for consumption in the generated test
+func fmtBlocks(bs []blo) string {
+ s := "[]blo{"
+ for _, b := range bs {
+ s += fmt.Sprintf("blo{inc:%d, cond:%v, succs:[2]int64{%d, %d}},", b.inc, b.cond, b.succs[0], b.succs[1])
+ }
+ s += "}"
+ return s
+}
+
+func main() {
+ fmt.Printf(`// This is a machine-generated test file from flowgraph_generator1.go.
+package main
+import "fmt"
+var glob bool
+`)
+ s := "var funs []fun = []fun{"
+ for _, g := range graphs {
+ split, fnameBase := blocks(g)
+ nconfigs := 1 << uint(len(split)-1)
+
+ for i := 0; i < nconfigs; i++ {
+ fname := fnameBase + fmt.Sprintf("%b", i)
+ bs, k := strings2blocks(split, fname, i)
+ fmt.Printf("%s", makeFunctionFromFlowGraph(bs, fname))
+ s += `
+ {f:` + fname + `, maxin:` + fmt.Sprintf("%d", 1<<k) + `, blocks:` + fmtBlocks(bs) + `},`
+ }
+
+ }
+ s += `}
+`
+ // write types for name+array tables.
+ fmt.Printf("%s",
+ `
+type blo struct {
+ inc int64
+ cond bool
+ succs [2]int64
+}
+type fun struct {
+ f func(int64) int64
+ maxin int64
+ blocks []blo
+}
+`)
+ // write table of function names and blo arrays.
+ fmt.Printf("%s", s)
+
+ // write interpreter and main/test
+ fmt.Printf("%s", `
+func interpret(blocks []blo, x int64) (int64, bool) {
+ y := int64(0)
+ last := int64(25) // 'Z'-'A'
+ j := int64(0)
+ for i := 0; i < 4*len(blocks); i++ {
+ b := blocks[j]
+ y += b.inc
+ next := b.succs[0]
+ if b.cond {
+ c := x&1 != 0
+ x = x>>1
+ if c {
+ next = b.succs[1]
+ }
+ }
+ if next == last {
+ return y, true
+ }
+ j = next
+ }
+ return -1, false
+}
+
+func main() {
+ sum := int64(0)
+ for i, f := range funs {
+ for x := int64(0); x < 16*f.maxin; x++ {
+ y, ok := interpret(f.blocks, x)
+ if ok {
+ yy := f.f(x)
+ if y != yy {
+ fmt.Printf("y(%d) != yy(%d), x=%b, i=%d, blocks=%v\n", y, yy, x, i, f.blocks)
+ return
+ }
+ sum += y
+ }
+ }
+ }
+// fmt.Printf("Sum of all returns over all terminating inputs is %d\n", sum)
+}
+`)
+}
diff --git a/src/cmd/compile/internal/test/testdata/fp_test.go b/src/cmd/compile/internal/test/testdata/fp_test.go
new file mode 100644
index 0000000..b96ce84
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/fp_test.go
@@ -0,0 +1,1775 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests floating point arithmetic expressions
+
+package main
+
+import (
+ "fmt"
+ "testing"
+)
+
+// manysub_ssa is designed to tickle bugs that depend on register
+// pressure or unfriendly operand ordering in registers (and at
+// least once it succeeded in this).
+//
+//go:noinline
+func manysub_ssa(a, b, c, d float64) (aa, ab, ac, ad, ba, bb, bc, bd, ca, cb, cc, cd, da, db, dc, dd float64) {
+ aa = a + 11.0 - a
+ ab = a - b
+ ac = a - c
+ ad = a - d
+ ba = b - a
+ bb = b + 22.0 - b
+ bc = b - c
+ bd = b - d
+ ca = c - a
+ cb = c - b
+ cc = c + 33.0 - c
+ cd = c - d
+ da = d - a
+ db = d - b
+ dc = d - c
+ dd = d + 44.0 - d
+ return
+}
+
+// fpspill_ssa attempts to trigger a bug where phis with floating point values
+// were stored in non-fp registers causing an error in doasm.
+//
+//go:noinline
+func fpspill_ssa(a int) float64 {
+
+ ret := -1.0
+ switch a {
+ case 0:
+ ret = 1.0
+ case 1:
+ ret = 1.1
+ case 2:
+ ret = 1.2
+ case 3:
+ ret = 1.3
+ case 4:
+ ret = 1.4
+ case 5:
+ ret = 1.5
+ case 6:
+ ret = 1.6
+ case 7:
+ ret = 1.7
+ case 8:
+ ret = 1.8
+ case 9:
+ ret = 1.9
+ case 10:
+ ret = 1.10
+ case 11:
+ ret = 1.11
+ case 12:
+ ret = 1.12
+ case 13:
+ ret = 1.13
+ case 14:
+ ret = 1.14
+ case 15:
+ ret = 1.15
+ case 16:
+ ret = 1.16
+ }
+ return ret
+}
+
+//go:noinline
+func add64_ssa(a, b float64) float64 {
+ return a + b
+}
+
+//go:noinline
+func mul64_ssa(a, b float64) float64 {
+ return a * b
+}
+
+//go:noinline
+func sub64_ssa(a, b float64) float64 {
+ return a - b
+}
+
+//go:noinline
+func div64_ssa(a, b float64) float64 {
+ return a / b
+}
+
+//go:noinline
+func neg64_ssa(a, b float64) float64 {
+ return -a + -1*b
+}
+
+//go:noinline
+func add32_ssa(a, b float32) float32 {
+ return a + b
+}
+
+//go:noinline
+func mul32_ssa(a, b float32) float32 {
+ return a * b
+}
+
+//go:noinline
+func sub32_ssa(a, b float32) float32 {
+ return a - b
+}
+
+//go:noinline
+func div32_ssa(a, b float32) float32 {
+ return a / b
+}
+
+//go:noinline
+func neg32_ssa(a, b float32) float32 {
+ return -a + -1*b
+}
+
+//go:noinline
+func conv2Float64_ssa(a int8, b uint8, c int16, d uint16,
+ e int32, f uint32, g int64, h uint64, i float32) (aa, bb, cc, dd, ee, ff, gg, hh, ii float64) {
+ aa = float64(a)
+ bb = float64(b)
+ cc = float64(c)
+ hh = float64(h)
+ dd = float64(d)
+ ee = float64(e)
+ ff = float64(f)
+ gg = float64(g)
+ ii = float64(i)
+ return
+}
+
+//go:noinline
+func conv2Float32_ssa(a int8, b uint8, c int16, d uint16,
+ e int32, f uint32, g int64, h uint64, i float64) (aa, bb, cc, dd, ee, ff, gg, hh, ii float32) {
+ aa = float32(a)
+ bb = float32(b)
+ cc = float32(c)
+ dd = float32(d)
+ ee = float32(e)
+ ff = float32(f)
+ gg = float32(g)
+ hh = float32(h)
+ ii = float32(i)
+ return
+}
+
+func integer2floatConversions(t *testing.T) {
+ {
+ a, b, c, d, e, f, g, h, i := conv2Float64_ssa(0, 0, 0, 0, 0, 0, 0, 0, 0)
+ expectAll64(t, "zero64", 0, a, b, c, d, e, f, g, h, i)
+ }
+ {
+ a, b, c, d, e, f, g, h, i := conv2Float64_ssa(1, 1, 1, 1, 1, 1, 1, 1, 1)
+ expectAll64(t, "one64", 1, a, b, c, d, e, f, g, h, i)
+ }
+ {
+ a, b, c, d, e, f, g, h, i := conv2Float32_ssa(0, 0, 0, 0, 0, 0, 0, 0, 0)
+ expectAll32(t, "zero32", 0, a, b, c, d, e, f, g, h, i)
+ }
+ {
+ a, b, c, d, e, f, g, h, i := conv2Float32_ssa(1, 1, 1, 1, 1, 1, 1, 1, 1)
+ expectAll32(t, "one32", 1, a, b, c, d, e, f, g, h, i)
+ }
+ {
+ // Check maximum values
+ a, b, c, d, e, f, g, h, i := conv2Float64_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823e38)
+ expect64(t, "a", a, 127)
+ expect64(t, "b", b, 255)
+ expect64(t, "c", c, 32767)
+ expect64(t, "d", d, 65535)
+ expect64(t, "e", e, float64(int32(0x7fffffff)))
+ expect64(t, "f", f, float64(uint32(0xffffffff)))
+ expect64(t, "g", g, float64(int64(0x7fffffffffffffff)))
+ expect64(t, "h", h, float64(uint64(0xffffffffffffffff)))
+ expect64(t, "i", i, float64(float32(3.402823e38)))
+ }
+ {
+ // Check minimum values (and tweaks for unsigned)
+ a, b, c, d, e, f, g, h, i := conv2Float64_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5e-45)
+ expect64(t, "a", a, -128)
+ expect64(t, "b", b, 254)
+ expect64(t, "c", c, -32768)
+ expect64(t, "d", d, 65534)
+ expect64(t, "e", e, float64(^int32(0x7fffffff)))
+ expect64(t, "f", f, float64(uint32(0xfffffffe)))
+ expect64(t, "g", g, float64(^int64(0x7fffffffffffffff)))
+ expect64(t, "h", h, float64(uint64(0xfffffffffffff401)))
+ expect64(t, "i", i, float64(float32(1.5e-45)))
+ }
+ {
+ // Check maximum values
+ a, b, c, d, e, f, g, h, i := conv2Float32_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823e38)
+ expect32(t, "a", a, 127)
+ expect32(t, "b", b, 255)
+ expect32(t, "c", c, 32767)
+ expect32(t, "d", d, 65535)
+ expect32(t, "e", e, float32(int32(0x7fffffff)))
+ expect32(t, "f", f, float32(uint32(0xffffffff)))
+ expect32(t, "g", g, float32(int64(0x7fffffffffffffff)))
+ expect32(t, "h", h, float32(uint64(0xffffffffffffffff)))
+ expect32(t, "i", i, float32(float64(3.402823e38)))
+ }
+ {
+ // Check minimum values (and tweaks for unsigned)
+ a, b, c, d, e, f, g, h, i := conv2Float32_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5e-45)
+ expect32(t, "a", a, -128)
+ expect32(t, "b", b, 254)
+ expect32(t, "c", c, -32768)
+ expect32(t, "d", d, 65534)
+ expect32(t, "e", e, float32(^int32(0x7fffffff)))
+ expect32(t, "f", f, float32(uint32(0xfffffffe)))
+ expect32(t, "g", g, float32(^int64(0x7fffffffffffffff)))
+ expect32(t, "h", h, float32(uint64(0xfffffffffffff401)))
+ expect32(t, "i", i, float32(float64(1.5e-45)))
+ }
+}
+
+func multiplyAdd(t *testing.T) {
+ {
+ // Test that a multiply-accumulate operation with intermediate
+ // rounding forced by a float32() cast produces the expected
+ // result.
+ // Test cases generated experimentally on a system (s390x) that
+ // supports fused multiply-add instructions.
+ var tests = [...]struct{ x, y, z, res float32 }{
+ {0.6046603, 0.9405091, 0.6645601, 1.2332485}, // fused multiply-add result: 1.2332486
+ {0.67908466, 0.21855305, 0.20318687, 0.3516029}, // fused multiply-add result: 0.35160288
+ {0.29311424, 0.29708257, 0.752573, 0.8396522}, // fused multiply-add result: 0.8396521
+ {0.5305857, 0.2535405, 0.282081, 0.41660595}, // fused multiply-add result: 0.41660598
+ {0.29711226, 0.89436173, 0.097454615, 0.36318043}, // fused multiply-add result: 0.36318046
+ {0.6810783, 0.24151509, 0.31152245, 0.47601312}, // fused multiply-add result: 0.47601315
+ {0.73023146, 0.18292491, 0.4283571, 0.5619346}, // fused multiply-add result: 0.56193465
+ {0.89634174, 0.32208398, 0.7211478, 1.009845}, // fused multiply-add result: 1.0098451
+ {0.6280982, 0.12675293, 0.2813303, 0.36094356}, // fused multiply-add result: 0.3609436
+ {0.29400632, 0.75316125, 0.15096405, 0.3723982}, // fused multiply-add result: 0.37239823
+ }
+ check := func(s string, got, expected float32) {
+ if got != expected {
+ fmt.Printf("multiplyAdd: %s, expected %g, got %g\n", s, expected, got)
+ }
+ }
+ for _, t := range tests {
+ check(
+ fmt.Sprintf("float32(%v * %v) + %v", t.x, t.y, t.z),
+ func(x, y, z float32) float32 {
+ return float32(x*y) + z
+ }(t.x, t.y, t.z),
+ t.res)
+
+ check(
+ fmt.Sprintf("%v += float32(%v * %v)", t.z, t.x, t.y),
+ func(x, y, z float32) float32 {
+ z += float32(x * y)
+ return z
+ }(t.x, t.y, t.z),
+ t.res)
+ }
+ }
+ {
+ // Test that a multiply-accumulate operation with intermediate
+ // rounding forced by a float64() cast produces the expected
+ // result.
+ // Test cases generated experimentally on a system (s390x) that
+ // supports fused multiply-add instructions.
+ var tests = [...]struct{ x, y, z, res float64 }{
+ {0.4688898449024232, 0.28303415118044517, 0.29310185733681576, 0.42581369658590373}, // fused multiply-add result: 0.4258136965859037
+ {0.7886049150193449, 0.3618054804803169, 0.8805431227416171, 1.1658647029293308}, // fused multiply-add result: 1.1658647029293305
+ {0.7302314772948083, 0.18292491645390843, 0.4283570818068078, 0.5619346137829748}, // fused multiply-add result: 0.5619346137829747
+ {0.6908388315056789, 0.7109071952999951, 0.5637795958152644, 1.0549018919252924}, // fused multiply-add result: 1.0549018919252926
+ {0.4584424785756506, 0.6001655953233308, 0.02626515060968944, 0.3014065536855481}, // fused multiply-add result: 0.30140655368554814
+ {0.539210105890946, 0.9756748149873165, 0.7507630564795985, 1.2768567767840384}, // fused multiply-add result: 1.2768567767840386
+ {0.7830349733960021, 0.3932509992288867, 0.1304138461737918, 0.4383431318929343}, // fused multiply-add result: 0.43834313189293433
+ {0.6841751300974551, 0.6530402051353608, 0.524499759549865, 0.9712936268572192}, // fused multiply-add result: 0.9712936268572193
+ {0.3691117091643448, 0.826454125634742, 0.34768170859156955, 0.6527356034505334}, // fused multiply-add result: 0.6527356034505333
+ {0.16867966833433606, 0.33136826030698385, 0.8279280961505588, 0.8838231843956668}, // fused multiply-add result: 0.8838231843956669
+ }
+ check := func(s string, got, expected float64) {
+ if got != expected {
+ fmt.Printf("multiplyAdd: %s, expected %g, got %g\n", s, expected, got)
+ }
+ }
+ for _, t := range tests {
+ check(
+ fmt.Sprintf("float64(%v * %v) + %v", t.x, t.y, t.z),
+ func(x, y, z float64) float64 {
+ return float64(x*y) + z
+ }(t.x, t.y, t.z),
+ t.res)
+
+ check(
+ fmt.Sprintf("%v += float64(%v * %v)", t.z, t.x, t.y),
+ func(x, y, z float64) float64 {
+ z += float64(x * y)
+ return z
+ }(t.x, t.y, t.z),
+ t.res)
+ }
+ }
+ {
+ // Test that a multiply-accumulate operation with intermediate
+ // rounding forced by a complex128() cast produces the expected
+ // result.
+ // Test cases generated experimentally on a system (s390x) that
+ // supports fused multiply-add instructions.
+ var tests = [...]struct {
+ x, y float64
+ res complex128
+ }{
+ {0.6046602879796196, 0.9405090880450124, (2.754489951983871 + 3i)}, // fused multiply-add result: (2.7544899519838713 + 3i)
+ {0.09696951891448456, 0.30091186058528707, (0.5918204173287407 + 3i)}, // fused multiply-add result: (0.5918204173287408 + 3i)
+ {0.544155573000885, 0.27850762181610883, (1.910974340818764 + 3i)}, // fused multiply-add result: (1.9109743408187638 + 3i)
+ {0.9769168685862624, 0.07429099894984302, (3.0050416047086297 + 3i)}, // fused multiply-add result: (3.00504160470863 + 3i)
+ {0.9269868035744142, 0.9549454404167818, (3.735905851140024 + 3i)}, // fused multiply-add result: (3.7359058511400245 + 3i)
+ {0.7109071952999951, 0.5637795958152644, (2.69650118171525 + 3i)}, // fused multiply-add result: (2.6965011817152496 + 3i)
+ {0.7558235074915978, 0.40380328579570035, (2.671273808270494 + 3i)}, // fused multiply-add result: (2.6712738082704934 + 3i)
+ {0.13065111702897217, 0.9859647293402467, (1.3779180804271633 + 3i)}, // fused multiply-add result: (1.3779180804271631 + 3i)
+ {0.8963417453962161, 0.3220839705208817, (3.0111092067095298 + 3i)}, // fused multiply-add result: (3.01110920670953 + 3i)
+ {0.39998376285699544, 0.497868113342702, (1.697819401913688 + 3i)}, // fused multiply-add result: (1.6978194019136883 + 3i)
+ }
+ check := func(s string, got, expected complex128) {
+ if got != expected {
+ fmt.Printf("multiplyAdd: %s, expected %v, got %v\n", s, expected, got)
+ }
+ }
+ for _, t := range tests {
+ check(
+ fmt.Sprintf("complex128(complex(%v, 1)*3) + complex(%v, 0)", t.x, t.y),
+ func(x, y float64) complex128 {
+ return complex128(complex(x, 1)*3) + complex(y, 0)
+ }(t.x, t.y),
+ t.res)
+
+ check(
+ fmt.Sprintf("z := complex(%v, 1); z += complex128(complex(%v, 1) * 3)", t.y, t.x),
+ func(x, y float64) complex128 {
+ z := complex(y, 0)
+ z += complex128(complex(x, 1) * 3)
+ return z
+ }(t.x, t.y),
+ t.res)
+ }
+ }
+}
+
+const (
+ aa = 0x1000000000000000
+ ab = 0x100000000000000
+ ac = 0x10000000000000
+ ad = 0x1000000000000
+ ba = 0x100000000000
+ bb = 0x10000000000
+ bc = 0x1000000000
+ bd = 0x100000000
+ ca = 0x10000000
+ cb = 0x1000000
+ cc = 0x100000
+ cd = 0x10000
+ da = 0x1000
+ db = 0x100
+ dc = 0x10
+ dd = 0x1
+)
+
+//go:noinline
+func compares64_ssa(a, b, c, d float64) (lt, le, eq, ne, ge, gt uint64) {
+ if a < a {
+ lt += aa
+ }
+ if a < b {
+ lt += ab
+ }
+ if a < c {
+ lt += ac
+ }
+ if a < d {
+ lt += ad
+ }
+
+ if b < a {
+ lt += ba
+ }
+ if b < b {
+ lt += bb
+ }
+ if b < c {
+ lt += bc
+ }
+ if b < d {
+ lt += bd
+ }
+
+ if c < a {
+ lt += ca
+ }
+ if c < b {
+ lt += cb
+ }
+ if c < c {
+ lt += cc
+ }
+ if c < d {
+ lt += cd
+ }
+
+ if d < a {
+ lt += da
+ }
+ if d < b {
+ lt += db
+ }
+ if d < c {
+ lt += dc
+ }
+ if d < d {
+ lt += dd
+ }
+
+ if a <= a {
+ le += aa
+ }
+ if a <= b {
+ le += ab
+ }
+ if a <= c {
+ le += ac
+ }
+ if a <= d {
+ le += ad
+ }
+
+ if b <= a {
+ le += ba
+ }
+ if b <= b {
+ le += bb
+ }
+ if b <= c {
+ le += bc
+ }
+ if b <= d {
+ le += bd
+ }
+
+ if c <= a {
+ le += ca
+ }
+ if c <= b {
+ le += cb
+ }
+ if c <= c {
+ le += cc
+ }
+ if c <= d {
+ le += cd
+ }
+
+ if d <= a {
+ le += da
+ }
+ if d <= b {
+ le += db
+ }
+ if d <= c {
+ le += dc
+ }
+ if d <= d {
+ le += dd
+ }
+
+ if a == a {
+ eq += aa
+ }
+ if a == b {
+ eq += ab
+ }
+ if a == c {
+ eq += ac
+ }
+ if a == d {
+ eq += ad
+ }
+
+ if b == a {
+ eq += ba
+ }
+ if b == b {
+ eq += bb
+ }
+ if b == c {
+ eq += bc
+ }
+ if b == d {
+ eq += bd
+ }
+
+ if c == a {
+ eq += ca
+ }
+ if c == b {
+ eq += cb
+ }
+ if c == c {
+ eq += cc
+ }
+ if c == d {
+ eq += cd
+ }
+
+ if d == a {
+ eq += da
+ }
+ if d == b {
+ eq += db
+ }
+ if d == c {
+ eq += dc
+ }
+ if d == d {
+ eq += dd
+ }
+
+ if a != a {
+ ne += aa
+ }
+ if a != b {
+ ne += ab
+ }
+ if a != c {
+ ne += ac
+ }
+ if a != d {
+ ne += ad
+ }
+
+ if b != a {
+ ne += ba
+ }
+ if b != b {
+ ne += bb
+ }
+ if b != c {
+ ne += bc
+ }
+ if b != d {
+ ne += bd
+ }
+
+ if c != a {
+ ne += ca
+ }
+ if c != b {
+ ne += cb
+ }
+ if c != c {
+ ne += cc
+ }
+ if c != d {
+ ne += cd
+ }
+
+ if d != a {
+ ne += da
+ }
+ if d != b {
+ ne += db
+ }
+ if d != c {
+ ne += dc
+ }
+ if d != d {
+ ne += dd
+ }
+
+ if a >= a {
+ ge += aa
+ }
+ if a >= b {
+ ge += ab
+ }
+ if a >= c {
+ ge += ac
+ }
+ if a >= d {
+ ge += ad
+ }
+
+ if b >= a {
+ ge += ba
+ }
+ if b >= b {
+ ge += bb
+ }
+ if b >= c {
+ ge += bc
+ }
+ if b >= d {
+ ge += bd
+ }
+
+ if c >= a {
+ ge += ca
+ }
+ if c >= b {
+ ge += cb
+ }
+ if c >= c {
+ ge += cc
+ }
+ if c >= d {
+ ge += cd
+ }
+
+ if d >= a {
+ ge += da
+ }
+ if d >= b {
+ ge += db
+ }
+ if d >= c {
+ ge += dc
+ }
+ if d >= d {
+ ge += dd
+ }
+
+ if a > a {
+ gt += aa
+ }
+ if a > b {
+ gt += ab
+ }
+ if a > c {
+ gt += ac
+ }
+ if a > d {
+ gt += ad
+ }
+
+ if b > a {
+ gt += ba
+ }
+ if b > b {
+ gt += bb
+ }
+ if b > c {
+ gt += bc
+ }
+ if b > d {
+ gt += bd
+ }
+
+ if c > a {
+ gt += ca
+ }
+ if c > b {
+ gt += cb
+ }
+ if c > c {
+ gt += cc
+ }
+ if c > d {
+ gt += cd
+ }
+
+ if d > a {
+ gt += da
+ }
+ if d > b {
+ gt += db
+ }
+ if d > c {
+ gt += dc
+ }
+ if d > d {
+ gt += dd
+ }
+
+ return
+}
+
+//go:noinline
+func compares32_ssa(a, b, c, d float32) (lt, le, eq, ne, ge, gt uint64) {
+ if a < a {
+ lt += aa
+ }
+ if a < b {
+ lt += ab
+ }
+ if a < c {
+ lt += ac
+ }
+ if a < d {
+ lt += ad
+ }
+
+ if b < a {
+ lt += ba
+ }
+ if b < b {
+ lt += bb
+ }
+ if b < c {
+ lt += bc
+ }
+ if b < d {
+ lt += bd
+ }
+
+ if c < a {
+ lt += ca
+ }
+ if c < b {
+ lt += cb
+ }
+ if c < c {
+ lt += cc
+ }
+ if c < d {
+ lt += cd
+ }
+
+ if d < a {
+ lt += da
+ }
+ if d < b {
+ lt += db
+ }
+ if d < c {
+ lt += dc
+ }
+ if d < d {
+ lt += dd
+ }
+
+ if a <= a {
+ le += aa
+ }
+ if a <= b {
+ le += ab
+ }
+ if a <= c {
+ le += ac
+ }
+ if a <= d {
+ le += ad
+ }
+
+ if b <= a {
+ le += ba
+ }
+ if b <= b {
+ le += bb
+ }
+ if b <= c {
+ le += bc
+ }
+ if b <= d {
+ le += bd
+ }
+
+ if c <= a {
+ le += ca
+ }
+ if c <= b {
+ le += cb
+ }
+ if c <= c {
+ le += cc
+ }
+ if c <= d {
+ le += cd
+ }
+
+ if d <= a {
+ le += da
+ }
+ if d <= b {
+ le += db
+ }
+ if d <= c {
+ le += dc
+ }
+ if d <= d {
+ le += dd
+ }
+
+ if a == a {
+ eq += aa
+ }
+ if a == b {
+ eq += ab
+ }
+ if a == c {
+ eq += ac
+ }
+ if a == d {
+ eq += ad
+ }
+
+ if b == a {
+ eq += ba
+ }
+ if b == b {
+ eq += bb
+ }
+ if b == c {
+ eq += bc
+ }
+ if b == d {
+ eq += bd
+ }
+
+ if c == a {
+ eq += ca
+ }
+ if c == b {
+ eq += cb
+ }
+ if c == c {
+ eq += cc
+ }
+ if c == d {
+ eq += cd
+ }
+
+ if d == a {
+ eq += da
+ }
+ if d == b {
+ eq += db
+ }
+ if d == c {
+ eq += dc
+ }
+ if d == d {
+ eq += dd
+ }
+
+ if a != a {
+ ne += aa
+ }
+ if a != b {
+ ne += ab
+ }
+ if a != c {
+ ne += ac
+ }
+ if a != d {
+ ne += ad
+ }
+
+ if b != a {
+ ne += ba
+ }
+ if b != b {
+ ne += bb
+ }
+ if b != c {
+ ne += bc
+ }
+ if b != d {
+ ne += bd
+ }
+
+ if c != a {
+ ne += ca
+ }
+ if c != b {
+ ne += cb
+ }
+ if c != c {
+ ne += cc
+ }
+ if c != d {
+ ne += cd
+ }
+
+ if d != a {
+ ne += da
+ }
+ if d != b {
+ ne += db
+ }
+ if d != c {
+ ne += dc
+ }
+ if d != d {
+ ne += dd
+ }
+
+ if a >= a {
+ ge += aa
+ }
+ if a >= b {
+ ge += ab
+ }
+ if a >= c {
+ ge += ac
+ }
+ if a >= d {
+ ge += ad
+ }
+
+ if b >= a {
+ ge += ba
+ }
+ if b >= b {
+ ge += bb
+ }
+ if b >= c {
+ ge += bc
+ }
+ if b >= d {
+ ge += bd
+ }
+
+ if c >= a {
+ ge += ca
+ }
+ if c >= b {
+ ge += cb
+ }
+ if c >= c {
+ ge += cc
+ }
+ if c >= d {
+ ge += cd
+ }
+
+ if d >= a {
+ ge += da
+ }
+ if d >= b {
+ ge += db
+ }
+ if d >= c {
+ ge += dc
+ }
+ if d >= d {
+ ge += dd
+ }
+
+ if a > a {
+ gt += aa
+ }
+ if a > b {
+ gt += ab
+ }
+ if a > c {
+ gt += ac
+ }
+ if a > d {
+ gt += ad
+ }
+
+ if b > a {
+ gt += ba
+ }
+ if b > b {
+ gt += bb
+ }
+ if b > c {
+ gt += bc
+ }
+ if b > d {
+ gt += bd
+ }
+
+ if c > a {
+ gt += ca
+ }
+ if c > b {
+ gt += cb
+ }
+ if c > c {
+ gt += cc
+ }
+ if c > d {
+ gt += cd
+ }
+
+ if d > a {
+ gt += da
+ }
+ if d > b {
+ gt += db
+ }
+ if d > c {
+ gt += dc
+ }
+ if d > d {
+ gt += dd
+ }
+
+ return
+}
+
+//go:noinline
+func le64_ssa(x, y float64) bool {
+ return x <= y
+}
+
+//go:noinline
+func ge64_ssa(x, y float64) bool {
+ return x >= y
+}
+
+//go:noinline
+func lt64_ssa(x, y float64) bool {
+ return x < y
+}
+
+//go:noinline
+func gt64_ssa(x, y float64) bool {
+ return x > y
+}
+
+//go:noinline
+func eq64_ssa(x, y float64) bool {
+ return x == y
+}
+
+//go:noinline
+func ne64_ssa(x, y float64) bool {
+ return x != y
+}
+
+//go:noinline
+func eqbr64_ssa(x, y float64) float64 {
+ if x == y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func nebr64_ssa(x, y float64) float64 {
+ if x != y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func gebr64_ssa(x, y float64) float64 {
+ if x >= y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func lebr64_ssa(x, y float64) float64 {
+ if x <= y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func ltbr64_ssa(x, y float64) float64 {
+ if x < y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func gtbr64_ssa(x, y float64) float64 {
+ if x > y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func le32_ssa(x, y float32) bool {
+ return x <= y
+}
+
+//go:noinline
+func ge32_ssa(x, y float32) bool {
+ return x >= y
+}
+
+//go:noinline
+func lt32_ssa(x, y float32) bool {
+ return x < y
+}
+
+//go:noinline
+func gt32_ssa(x, y float32) bool {
+ return x > y
+}
+
+//go:noinline
+func eq32_ssa(x, y float32) bool {
+ return x == y
+}
+
+//go:noinline
+func ne32_ssa(x, y float32) bool {
+ return x != y
+}
+
+//go:noinline
+func eqbr32_ssa(x, y float32) float32 {
+ if x == y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func nebr32_ssa(x, y float32) float32 {
+ if x != y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func gebr32_ssa(x, y float32) float32 {
+ if x >= y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func lebr32_ssa(x, y float32) float32 {
+ if x <= y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func ltbr32_ssa(x, y float32) float32 {
+ if x < y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func gtbr32_ssa(x, y float32) float32 {
+ if x > y {
+ return 17
+ }
+ return 42
+}
+
+//go:noinline
+func F32toU8_ssa(x float32) uint8 {
+ return uint8(x)
+}
+
+//go:noinline
+func F32toI8_ssa(x float32) int8 {
+ return int8(x)
+}
+
+//go:noinline
+func F32toU16_ssa(x float32) uint16 {
+ return uint16(x)
+}
+
+//go:noinline
+func F32toI16_ssa(x float32) int16 {
+ return int16(x)
+}
+
+//go:noinline
+func F32toU32_ssa(x float32) uint32 {
+ return uint32(x)
+}
+
+//go:noinline
+func F32toI32_ssa(x float32) int32 {
+ return int32(x)
+}
+
+//go:noinline
+func F32toU64_ssa(x float32) uint64 {
+ return uint64(x)
+}
+
+//go:noinline
+func F32toI64_ssa(x float32) int64 {
+ return int64(x)
+}
+
+//go:noinline
+func F64toU8_ssa(x float64) uint8 {
+ return uint8(x)
+}
+
+//go:noinline
+func F64toI8_ssa(x float64) int8 {
+ return int8(x)
+}
+
+//go:noinline
+func F64toU16_ssa(x float64) uint16 {
+ return uint16(x)
+}
+
+//go:noinline
+func F64toI16_ssa(x float64) int16 {
+ return int16(x)
+}
+
+//go:noinline
+func F64toU32_ssa(x float64) uint32 {
+ return uint32(x)
+}
+
+//go:noinline
+func F64toI32_ssa(x float64) int32 {
+ return int32(x)
+}
+
+//go:noinline
+func F64toU64_ssa(x float64) uint64 {
+ return uint64(x)
+}
+
+//go:noinline
+func F64toI64_ssa(x float64) int64 {
+ return int64(x)
+}
+
+func floatsToInts(t *testing.T, x float64, expected int64) {
+ y := float32(x)
+ expectInt64(t, "F64toI8", int64(F64toI8_ssa(x)), expected)
+ expectInt64(t, "F64toI16", int64(F64toI16_ssa(x)), expected)
+ expectInt64(t, "F64toI32", int64(F64toI32_ssa(x)), expected)
+ expectInt64(t, "F64toI64", int64(F64toI64_ssa(x)), expected)
+ expectInt64(t, "F32toI8", int64(F32toI8_ssa(y)), expected)
+ expectInt64(t, "F32toI16", int64(F32toI16_ssa(y)), expected)
+ expectInt64(t, "F32toI32", int64(F32toI32_ssa(y)), expected)
+ expectInt64(t, "F32toI64", int64(F32toI64_ssa(y)), expected)
+}
+
+func floatsToUints(t *testing.T, x float64, expected uint64) {
+ y := float32(x)
+ expectUint64(t, "F64toU8", uint64(F64toU8_ssa(x)), expected)
+ expectUint64(t, "F64toU16", uint64(F64toU16_ssa(x)), expected)
+ expectUint64(t, "F64toU32", uint64(F64toU32_ssa(x)), expected)
+ expectUint64(t, "F64toU64", uint64(F64toU64_ssa(x)), expected)
+ expectUint64(t, "F32toU8", uint64(F32toU8_ssa(y)), expected)
+ expectUint64(t, "F32toU16", uint64(F32toU16_ssa(y)), expected)
+ expectUint64(t, "F32toU32", uint64(F32toU32_ssa(y)), expected)
+ expectUint64(t, "F32toU64", uint64(F32toU64_ssa(y)), expected)
+}
+
+func floatingToIntegerConversionsTest(t *testing.T) {
+ floatsToInts(t, 0.0, 0)
+ floatsToInts(t, 0.5, 0)
+ floatsToInts(t, 0.9, 0)
+ floatsToInts(t, 1.0, 1)
+ floatsToInts(t, 1.5, 1)
+ floatsToInts(t, 127.0, 127)
+ floatsToInts(t, -1.0, -1)
+ floatsToInts(t, -128.0, -128)
+
+ floatsToUints(t, 0.0, 0)
+ floatsToUints(t, 1.0, 1)
+ floatsToUints(t, 255.0, 255)
+
+ for j := uint(0); j < 24; j++ {
+ // Avoid hard cases in the construction
+ // of the test inputs.
+ v := int64(1<<62) | int64(1<<(62-j))
+ w := uint64(v)
+ f := float32(v)
+ d := float64(v)
+ expectUint64(t, "2**62...", F32toU64_ssa(f), w)
+ expectUint64(t, "2**62...", F64toU64_ssa(d), w)
+ expectInt64(t, "2**62...", F32toI64_ssa(f), v)
+ expectInt64(t, "2**62...", F64toI64_ssa(d), v)
+ expectInt64(t, "2**62...", F32toI64_ssa(-f), -v)
+ expectInt64(t, "2**62...", F64toI64_ssa(-d), -v)
+ w += w
+ f += f
+ d += d
+ expectUint64(t, "2**63...", F32toU64_ssa(f), w)
+ expectUint64(t, "2**63...", F64toU64_ssa(d), w)
+ }
+
+ for j := uint(0); j < 16; j++ {
+ // Avoid hard cases in the construction
+ // of the test inputs.
+ v := int32(1<<30) | int32(1<<(30-j))
+ w := uint32(v)
+ f := float32(v)
+ d := float64(v)
+ expectUint32(t, "2**30...", F32toU32_ssa(f), w)
+ expectUint32(t, "2**30...", F64toU32_ssa(d), w)
+ expectInt32(t, "2**30...", F32toI32_ssa(f), v)
+ expectInt32(t, "2**30...", F64toI32_ssa(d), v)
+ expectInt32(t, "2**30...", F32toI32_ssa(-f), -v)
+ expectInt32(t, "2**30...", F64toI32_ssa(-d), -v)
+ w += w
+ f += f
+ d += d
+ expectUint32(t, "2**31...", F32toU32_ssa(f), w)
+ expectUint32(t, "2**31...", F64toU32_ssa(d), w)
+ }
+
+ for j := uint(0); j < 15; j++ {
+ // Avoid hard cases in the construction
+ // of the test inputs.
+ v := int16(1<<14) | int16(1<<(14-j))
+ w := uint16(v)
+ f := float32(v)
+ d := float64(v)
+ expectUint16(t, "2**14...", F32toU16_ssa(f), w)
+ expectUint16(t, "2**14...", F64toU16_ssa(d), w)
+ expectInt16(t, "2**14...", F32toI16_ssa(f), v)
+ expectInt16(t, "2**14...", F64toI16_ssa(d), v)
+ expectInt16(t, "2**14...", F32toI16_ssa(-f), -v)
+ expectInt16(t, "2**14...", F64toI16_ssa(-d), -v)
+ w += w
+ f += f
+ d += d
+ expectUint16(t, "2**15...", F32toU16_ssa(f), w)
+ expectUint16(t, "2**15...", F64toU16_ssa(d), w)
+ }
+
+ expectInt32(t, "-2147483648", F32toI32_ssa(-2147483648), -2147483648)
+
+ expectInt32(t, "-2147483648", F64toI32_ssa(-2147483648), -2147483648)
+ expectInt32(t, "-2147483647", F64toI32_ssa(-2147483647), -2147483647)
+ expectUint32(t, "4294967295", F64toU32_ssa(4294967295), 4294967295)
+
+ expectInt16(t, "-32768", F64toI16_ssa(-32768), -32768)
+ expectInt16(t, "-32768", F32toI16_ssa(-32768), -32768)
+
+ // NB more of a pain to do these for 32-bit because of lost bits in Float32 mantissa
+ expectInt16(t, "32767", F64toI16_ssa(32767), 32767)
+ expectInt16(t, "32767", F32toI16_ssa(32767), 32767)
+ expectUint16(t, "32767", F64toU16_ssa(32767), 32767)
+ expectUint16(t, "32767", F32toU16_ssa(32767), 32767)
+ expectUint16(t, "65535", F64toU16_ssa(65535), 65535)
+ expectUint16(t, "65535", F32toU16_ssa(65535), 65535)
+}
+
+func fail64(s string, f func(a, b float64) float64, a, b, e float64) {
+ d := f(a, b)
+ if d != e {
+ fmt.Printf("For (float64) %v %v %v, expected %v, got %v\n", a, s, b, e, d)
+ }
+}
+
+func fail64bool(s string, f func(a, b float64) bool, a, b float64, e bool) {
+ d := f(a, b)
+ if d != e {
+ fmt.Printf("For (float64) %v %v %v, expected %v, got %v\n", a, s, b, e, d)
+ }
+}
+
+func fail32(s string, f func(a, b float32) float32, a, b, e float32) {
+ d := f(a, b)
+ if d != e {
+ fmt.Printf("For (float32) %v %v %v, expected %v, got %v\n", a, s, b, e, d)
+ }
+}
+
+func fail32bool(s string, f func(a, b float32) bool, a, b float32, e bool) {
+ d := f(a, b)
+ if d != e {
+ fmt.Printf("For (float32) %v %v %v, expected %v, got %v\n", a, s, b, e, d)
+ }
+}
+
+func expect64(t *testing.T, s string, x, expected float64) {
+ if x != expected {
+ println("F64 Expected", expected, "for", s, ", got", x)
+ }
+}
+
+func expect32(t *testing.T, s string, x, expected float32) {
+ if x != expected {
+ println("F32 Expected", expected, "for", s, ", got", x)
+ }
+}
+
+func expectUint64(t *testing.T, s string, x, expected uint64) {
+ if x != expected {
+ fmt.Printf("U64 Expected 0x%016x for %s, got 0x%016x\n", expected, s, x)
+ }
+}
+
+func expectInt64(t *testing.T, s string, x, expected int64) {
+ if x != expected {
+ fmt.Printf("%s: Expected 0x%016x, got 0x%016x\n", s, expected, x)
+ }
+}
+
+func expectUint32(t *testing.T, s string, x, expected uint32) {
+ if x != expected {
+ fmt.Printf("U32 %s: Expected 0x%08x, got 0x%08x\n", s, expected, x)
+ }
+}
+
+func expectInt32(t *testing.T, s string, x, expected int32) {
+ if x != expected {
+ fmt.Printf("I32 %s: Expected 0x%08x, got 0x%08x\n", s, expected, x)
+ }
+}
+
+func expectUint16(t *testing.T, s string, x, expected uint16) {
+ if x != expected {
+ fmt.Printf("U16 %s: Expected 0x%04x, got 0x%04x\n", s, expected, x)
+ }
+}
+
+func expectInt16(t *testing.T, s string, x, expected int16) {
+ if x != expected {
+ fmt.Printf("I16 %s: Expected 0x%04x, got 0x%04x\n", s, expected, x)
+ }
+}
+
+func expectAll64(t *testing.T, s string, expected, a, b, c, d, e, f, g, h, i float64) {
+ expect64(t, s+":a", a, expected)
+ expect64(t, s+":b", b, expected)
+ expect64(t, s+":c", c, expected)
+ expect64(t, s+":d", d, expected)
+ expect64(t, s+":e", e, expected)
+ expect64(t, s+":f", f, expected)
+ expect64(t, s+":g", g, expected)
+}
+
+func expectAll32(t *testing.T, s string, expected, a, b, c, d, e, f, g, h, i float32) {
+ expect32(t, s+":a", a, expected)
+ expect32(t, s+":b", b, expected)
+ expect32(t, s+":c", c, expected)
+ expect32(t, s+":d", d, expected)
+ expect32(t, s+":e", e, expected)
+ expect32(t, s+":f", f, expected)
+ expect32(t, s+":g", g, expected)
+}
+
+var ev64 [2]float64 = [2]float64{42.0, 17.0}
+var ev32 [2]float32 = [2]float32{42.0, 17.0}
+
+func cmpOpTest(t *testing.T,
+ s string,
+ f func(a, b float64) bool,
+ g func(a, b float64) float64,
+ ff func(a, b float32) bool,
+ gg func(a, b float32) float32,
+ zero, one, inf, nan float64, result uint) {
+ fail64bool(s, f, zero, zero, result>>16&1 == 1)
+ fail64bool(s, f, zero, one, result>>12&1 == 1)
+ fail64bool(s, f, zero, inf, result>>8&1 == 1)
+ fail64bool(s, f, zero, nan, result>>4&1 == 1)
+ fail64bool(s, f, nan, nan, result&1 == 1)
+
+ fail64(s, g, zero, zero, ev64[result>>16&1])
+ fail64(s, g, zero, one, ev64[result>>12&1])
+ fail64(s, g, zero, inf, ev64[result>>8&1])
+ fail64(s, g, zero, nan, ev64[result>>4&1])
+ fail64(s, g, nan, nan, ev64[result>>0&1])
+
+ {
+ zero := float32(zero)
+ one := float32(one)
+ inf := float32(inf)
+ nan := float32(nan)
+ fail32bool(s, ff, zero, zero, (result>>16)&1 == 1)
+ fail32bool(s, ff, zero, one, (result>>12)&1 == 1)
+ fail32bool(s, ff, zero, inf, (result>>8)&1 == 1)
+ fail32bool(s, ff, zero, nan, (result>>4)&1 == 1)
+ fail32bool(s, ff, nan, nan, result&1 == 1)
+
+ fail32(s, gg, zero, zero, ev32[(result>>16)&1])
+ fail32(s, gg, zero, one, ev32[(result>>12)&1])
+ fail32(s, gg, zero, inf, ev32[(result>>8)&1])
+ fail32(s, gg, zero, nan, ev32[(result>>4)&1])
+ fail32(s, gg, nan, nan, ev32[(result>>0)&1])
+ }
+}
+
+func expectCx128(t *testing.T, s string, x, expected complex128) {
+ if x != expected {
+ t.Errorf("Cx 128 Expected %f for %s, got %f", expected, s, x)
+ }
+}
+
+func expectCx64(t *testing.T, s string, x, expected complex64) {
+ if x != expected {
+ t.Errorf("Cx 64 Expected %f for %s, got %f", expected, s, x)
+ }
+}
+
+//go:noinline
+func cx128sum_ssa(a, b complex128) complex128 {
+ return a + b
+}
+
+//go:noinline
+func cx128diff_ssa(a, b complex128) complex128 {
+ return a - b
+}
+
+//go:noinline
+func cx128prod_ssa(a, b complex128) complex128 {
+ return a * b
+}
+
+//go:noinline
+func cx128quot_ssa(a, b complex128) complex128 {
+ return a / b
+}
+
+//go:noinline
+func cx128neg_ssa(a complex128) complex128 {
+ return -a
+}
+
+//go:noinline
+func cx128real_ssa(a complex128) float64 {
+ return real(a)
+}
+
+//go:noinline
+func cx128imag_ssa(a complex128) float64 {
+ return imag(a)
+}
+
+//go:noinline
+func cx128cnst_ssa(a complex128) complex128 {
+ b := 2 + 3i
+ return a * b
+}
+
+//go:noinline
+func cx64sum_ssa(a, b complex64) complex64 {
+ return a + b
+}
+
+//go:noinline
+func cx64diff_ssa(a, b complex64) complex64 {
+ return a - b
+}
+
+//go:noinline
+func cx64prod_ssa(a, b complex64) complex64 {
+ return a * b
+}
+
+//go:noinline
+func cx64quot_ssa(a, b complex64) complex64 {
+ return a / b
+}
+
+//go:noinline
+func cx64neg_ssa(a complex64) complex64 {
+ return -a
+}
+
+//go:noinline
+func cx64real_ssa(a complex64) float32 {
+ return real(a)
+}
+
+//go:noinline
+func cx64imag_ssa(a complex64) float32 {
+ return imag(a)
+}
+
+//go:noinline
+func cx128eq_ssa(a, b complex128) bool {
+ return a == b
+}
+
+//go:noinline
+func cx128ne_ssa(a, b complex128) bool {
+ return a != b
+}
+
+//go:noinline
+func cx64eq_ssa(a, b complex64) bool {
+ return a == b
+}
+
+//go:noinline
+func cx64ne_ssa(a, b complex64) bool {
+ return a != b
+}
+
+func expectTrue(t *testing.T, s string, b bool) {
+ if !b {
+ t.Errorf("expected true for %s, got false", s)
+ }
+}
+func expectFalse(t *testing.T, s string, b bool) {
+ if b {
+ t.Errorf("expected false for %s, got true", s)
+ }
+}
+
+func complexTest128(t *testing.T) {
+ var a complex128 = 1 + 2i
+ var b complex128 = 3 + 6i
+ sum := cx128sum_ssa(b, a)
+ diff := cx128diff_ssa(b, a)
+ prod := cx128prod_ssa(b, a)
+ quot := cx128quot_ssa(b, a)
+ neg := cx128neg_ssa(a)
+ r := cx128real_ssa(a)
+ i := cx128imag_ssa(a)
+ cnst := cx128cnst_ssa(a)
+ c1 := cx128eq_ssa(a, a)
+ c2 := cx128eq_ssa(a, b)
+ c3 := cx128ne_ssa(a, a)
+ c4 := cx128ne_ssa(a, b)
+
+ expectCx128(t, "sum", sum, 4+8i)
+ expectCx128(t, "diff", diff, 2+4i)
+ expectCx128(t, "prod", prod, -9+12i)
+ expectCx128(t, "quot", quot, 3+0i)
+ expectCx128(t, "neg", neg, -1-2i)
+ expect64(t, "real", r, 1)
+ expect64(t, "imag", i, 2)
+ expectCx128(t, "cnst", cnst, -4+7i)
+ expectTrue(t, fmt.Sprintf("%v==%v", a, a), c1)
+ expectFalse(t, fmt.Sprintf("%v==%v", a, b), c2)
+ expectFalse(t, fmt.Sprintf("%v!=%v", a, a), c3)
+ expectTrue(t, fmt.Sprintf("%v!=%v", a, b), c4)
+}
+
+func complexTest64(t *testing.T) {
+ var a complex64 = 1 + 2i
+ var b complex64 = 3 + 6i
+ sum := cx64sum_ssa(b, a)
+ diff := cx64diff_ssa(b, a)
+ prod := cx64prod_ssa(b, a)
+ quot := cx64quot_ssa(b, a)
+ neg := cx64neg_ssa(a)
+ r := cx64real_ssa(a)
+ i := cx64imag_ssa(a)
+ c1 := cx64eq_ssa(a, a)
+ c2 := cx64eq_ssa(a, b)
+ c3 := cx64ne_ssa(a, a)
+ c4 := cx64ne_ssa(a, b)
+
+ expectCx64(t, "sum", sum, 4+8i)
+ expectCx64(t, "diff", diff, 2+4i)
+ expectCx64(t, "prod", prod, -9+12i)
+ expectCx64(t, "quot", quot, 3+0i)
+ expectCx64(t, "neg", neg, -1-2i)
+ expect32(t, "real", r, 1)
+ expect32(t, "imag", i, 2)
+ expectTrue(t, fmt.Sprintf("%v==%v", a, a), c1)
+ expectFalse(t, fmt.Sprintf("%v==%v", a, b), c2)
+ expectFalse(t, fmt.Sprintf("%v!=%v", a, a), c3)
+ expectTrue(t, fmt.Sprintf("%v!=%v", a, b), c4)
+}
+
+// TestFP tests that we get the right answer for floating point expressions.
+func TestFP(t *testing.T) {
+ a := 3.0
+ b := 4.0
+
+ c := float32(3.0)
+ d := float32(4.0)
+
+ tiny := float32(1.5e-45) // smallest f32 denorm = 2**(-149)
+ dtiny := float64(tiny) // well within range of f64
+
+ fail64("+", add64_ssa, a, b, 7.0)
+ fail64("*", mul64_ssa, a, b, 12.0)
+ fail64("-", sub64_ssa, a, b, -1.0)
+ fail64("/", div64_ssa, a, b, 0.75)
+ fail64("neg", neg64_ssa, a, b, -7)
+
+ fail32("+", add32_ssa, c, d, 7.0)
+ fail32("*", mul32_ssa, c, d, 12.0)
+ fail32("-", sub32_ssa, c, d, -1.0)
+ fail32("/", div32_ssa, c, d, 0.75)
+ fail32("neg", neg32_ssa, c, d, -7)
+
+ // denorm-squared should underflow to zero.
+ fail32("*", mul32_ssa, tiny, tiny, 0)
+
+ // but should not underflow in float and in fact is exactly representable.
+ fail64("*", mul64_ssa, dtiny, dtiny, 1.9636373861190906e-90)
+
+ // Intended to create register pressure which forces
+ // asymmetric op into different code paths.
+ aa, ab, ac, ad, ba, bb, bc, bd, ca, cb, cc, cd, da, db, dc, dd := manysub_ssa(1000.0, 100.0, 10.0, 1.0)
+
+ expect64(t, "aa", aa, 11.0)
+ expect64(t, "ab", ab, 900.0)
+ expect64(t, "ac", ac, 990.0)
+ expect64(t, "ad", ad, 999.0)
+
+ expect64(t, "ba", ba, -900.0)
+ expect64(t, "bb", bb, 22.0)
+ expect64(t, "bc", bc, 90.0)
+ expect64(t, "bd", bd, 99.0)
+
+ expect64(t, "ca", ca, -990.0)
+ expect64(t, "cb", cb, -90.0)
+ expect64(t, "cc", cc, 33.0)
+ expect64(t, "cd", cd, 9.0)
+
+ expect64(t, "da", da, -999.0)
+ expect64(t, "db", db, -99.0)
+ expect64(t, "dc", dc, -9.0)
+ expect64(t, "dd", dd, 44.0)
+
+ integer2floatConversions(t)
+
+ multiplyAdd(t)
+
+ var zero64 float64 = 0.0
+ var one64 float64 = 1.0
+ var inf64 float64 = 1.0 / zero64
+ var nan64 float64 = sub64_ssa(inf64, inf64)
+
+ cmpOpTest(t, "!=", ne64_ssa, nebr64_ssa, ne32_ssa, nebr32_ssa, zero64, one64, inf64, nan64, 0x01111)
+ cmpOpTest(t, "==", eq64_ssa, eqbr64_ssa, eq32_ssa, eqbr32_ssa, zero64, one64, inf64, nan64, 0x10000)
+ cmpOpTest(t, "<=", le64_ssa, lebr64_ssa, le32_ssa, lebr32_ssa, zero64, one64, inf64, nan64, 0x11100)
+ cmpOpTest(t, "<", lt64_ssa, ltbr64_ssa, lt32_ssa, ltbr32_ssa, zero64, one64, inf64, nan64, 0x01100)
+ cmpOpTest(t, ">", gt64_ssa, gtbr64_ssa, gt32_ssa, gtbr32_ssa, zero64, one64, inf64, nan64, 0x00000)
+ cmpOpTest(t, ">=", ge64_ssa, gebr64_ssa, ge32_ssa, gebr32_ssa, zero64, one64, inf64, nan64, 0x10000)
+
+ {
+ lt, le, eq, ne, ge, gt := compares64_ssa(0.0, 1.0, inf64, nan64)
+ expectUint64(t, "lt", lt, 0x0110001000000000)
+ expectUint64(t, "le", le, 0x1110011000100000)
+ expectUint64(t, "eq", eq, 0x1000010000100000)
+ expectUint64(t, "ne", ne, 0x0111101111011111)
+ expectUint64(t, "ge", ge, 0x1000110011100000)
+ expectUint64(t, "gt", gt, 0x0000100011000000)
+ // fmt.Printf("lt=0x%016x, le=0x%016x, eq=0x%016x, ne=0x%016x, ge=0x%016x, gt=0x%016x\n",
+ // lt, le, eq, ne, ge, gt)
+ }
+ {
+ lt, le, eq, ne, ge, gt := compares32_ssa(0.0, 1.0, float32(inf64), float32(nan64))
+ expectUint64(t, "lt", lt, 0x0110001000000000)
+ expectUint64(t, "le", le, 0x1110011000100000)
+ expectUint64(t, "eq", eq, 0x1000010000100000)
+ expectUint64(t, "ne", ne, 0x0111101111011111)
+ expectUint64(t, "ge", ge, 0x1000110011100000)
+ expectUint64(t, "gt", gt, 0x0000100011000000)
+ }
+
+ floatingToIntegerConversionsTest(t)
+ complexTest128(t)
+ complexTest64(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go b/src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go
new file mode 100644
index 0000000..b03c105
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go
@@ -0,0 +1,208 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This program generates a test to verify that the standard arithmetic
+// operators properly handle some special cases. The test file should be
+// generated with a known working version of go.
+// launch with `go run arithBoundaryGen.go` a file called arithBoundary.go
+// will be written into the parent directory containing the tests
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "text/template"
+)
+
+// used for interpolation in a text template
+type tmplData struct {
+ Name, Stype, Symbol string
+}
+
+// used to work around an issue with the mod symbol being
+// interpreted as part of a format string
+func (s tmplData) SymFirst() string {
+ return string(s.Symbol[0])
+}
+
+// ucast casts an unsigned int to the size in s
+func ucast(i uint64, s sizedTestData) uint64 {
+ switch s.name {
+ case "uint32":
+ return uint64(uint32(i))
+ case "uint16":
+ return uint64(uint16(i))
+ case "uint8":
+ return uint64(uint8(i))
+ }
+ return i
+}
+
+// icast casts a signed int to the size in s
+func icast(i int64, s sizedTestData) int64 {
+ switch s.name {
+ case "int32":
+ return int64(int32(i))
+ case "int16":
+ return int64(int16(i))
+ case "int8":
+ return int64(int8(i))
+ }
+ return i
+}
+
+type sizedTestData struct {
+ name string
+ sn string
+ u []uint64
+ i []int64
+}
+
+// values to generate tests. these should include the smallest and largest values, along
+// with any other values that might cause issues. we generate n^2 tests for each size to
+// cover all cases.
+var szs = []sizedTestData{
+ sizedTestData{name: "uint64", sn: "64", u: []uint64{0, 1, 4294967296, 0xffffFFFFffffFFFF}},
+ sizedTestData{name: "int64", sn: "64", i: []int64{-0x8000000000000000, -0x7FFFFFFFFFFFFFFF,
+ -4294967296, -1, 0, 1, 4294967296, 0x7FFFFFFFFFFFFFFE, 0x7FFFFFFFFFFFFFFF}},
+
+ sizedTestData{name: "uint32", sn: "32", u: []uint64{0, 1, 4294967295}},
+ sizedTestData{name: "int32", sn: "32", i: []int64{-0x80000000, -0x7FFFFFFF, -1, 0,
+ 1, 0x7FFFFFFF}},
+
+ sizedTestData{name: "uint16", sn: "16", u: []uint64{0, 1, 65535}},
+ sizedTestData{name: "int16", sn: "16", i: []int64{-32768, -32767, -1, 0, 1, 32766, 32767}},
+
+ sizedTestData{name: "uint8", sn: "8", u: []uint64{0, 1, 255}},
+ sizedTestData{name: "int8", sn: "8", i: []int64{-128, -127, -1, 0, 1, 126, 127}},
+}
+
+type op struct {
+ name, symbol string
+}
+
+// ops that we will be generating tests for
+var ops = []op{op{"add", "+"}, op{"sub", "-"}, op{"div", "/"}, op{"mod", "%%"}, op{"mul", "*"}}
+
+func main() {
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// Code generated by gen/arithBoundaryGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package main;\n")
+ fmt.Fprintf(w, "import \"testing\"\n")
+
+ for _, sz := range []int{64, 32, 16, 8} {
+ fmt.Fprintf(w, "type utd%d struct {\n", sz)
+ fmt.Fprintf(w, " a,b uint%d\n", sz)
+ fmt.Fprintf(w, " add,sub,mul,div,mod uint%d\n", sz)
+ fmt.Fprintf(w, "}\n")
+
+ fmt.Fprintf(w, "type itd%d struct {\n", sz)
+ fmt.Fprintf(w, " a,b int%d\n", sz)
+ fmt.Fprintf(w, " add,sub,mul,div,mod int%d\n", sz)
+ fmt.Fprintf(w, "}\n")
+ }
+
+ // the function being tested
+ testFunc, err := template.New("testFunc").Parse(
+ `//go:noinline
+ func {{.Name}}_{{.Stype}}_ssa(a, b {{.Stype}}) {{.Stype}} {
+ return a {{.SymFirst}} b
+}
+`)
+ if err != nil {
+ panic(err)
+ }
+
+ // generate our functions to be tested
+ for _, s := range szs {
+ for _, o := range ops {
+ fd := tmplData{o.name, s.name, o.symbol}
+ err = testFunc.Execute(w, fd)
+ if err != nil {
+ panic(err)
+ }
+ }
+ }
+
+ // generate the test data
+ for _, s := range szs {
+ if len(s.u) > 0 {
+ fmt.Fprintf(w, "var %s_data []utd%s = []utd%s{", s.name, s.sn, s.sn)
+ for _, i := range s.u {
+ for _, j := range s.u {
+ fmt.Fprintf(w, "utd%s{a: %d, b: %d, add: %d, sub: %d, mul: %d", s.sn, i, j, ucast(i+j, s), ucast(i-j, s), ucast(i*j, s))
+ if j != 0 {
+ fmt.Fprintf(w, ", div: %d, mod: %d", ucast(i/j, s), ucast(i%j, s))
+ }
+ fmt.Fprint(w, "},\n")
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ } else {
+ // TODO: clean up this duplication
+ fmt.Fprintf(w, "var %s_data []itd%s = []itd%s{", s.name, s.sn, s.sn)
+ for _, i := range s.i {
+ for _, j := range s.i {
+ fmt.Fprintf(w, "itd%s{a: %d, b: %d, add: %d, sub: %d, mul: %d", s.sn, i, j, icast(i+j, s), icast(i-j, s), icast(i*j, s))
+ if j != 0 {
+ fmt.Fprintf(w, ", div: %d, mod: %d", icast(i/j, s), icast(i%j, s))
+ }
+ fmt.Fprint(w, "},\n")
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ }
+ }
+
+ fmt.Fprintf(w, "//TestArithmeticBoundary tests boundary results for arithmetic operations.\n")
+ fmt.Fprintf(w, "func TestArithmeticBoundary(t *testing.T) {\n\n")
+
+ verify, err := template.New("tst").Parse(
+ `if got := {{.Name}}_{{.Stype}}_ssa(v.a, v.b); got != v.{{.Name}} {
+ t.Errorf("{{.Name}}_{{.Stype}} %d{{.Symbol}}%d = %d, wanted %d\n",v.a,v.b,got,v.{{.Name}})
+}
+`)
+
+ for _, s := range szs {
+ fmt.Fprintf(w, "for _, v := range %s_data {\n", s.name)
+
+ for _, o := range ops {
+ // avoid generating tests that divide by zero
+ if o.name == "div" || o.name == "mod" {
+ fmt.Fprint(w, "if v.b != 0 {")
+ }
+
+ err = verify.Execute(w, tmplData{o.name, s.name, o.symbol})
+
+ if o.name == "div" || o.name == "mod" {
+ fmt.Fprint(w, "\n}\n")
+ }
+
+ if err != nil {
+ panic(err)
+ }
+
+ }
+ fmt.Fprint(w, " }\n")
+ }
+
+ fmt.Fprintf(w, "}\n")
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../arithBoundary_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/arithConstGen.go b/src/cmd/compile/internal/test/testdata/gen/arithConstGen.go
new file mode 100644
index 0000000..1649f46
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/arithConstGen.go
@@ -0,0 +1,345 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This program generates a test to verify that the standard arithmetic
+// operators properly handle const cases. The test file should be
+// generated with a known working version of go.
+// launch with `go run arithConstGen.go` a file called arithConst.go
+// will be written into the parent directory containing the tests
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "strings"
+ "text/template"
+)
+
+type op struct {
+ name, symbol string
+}
+type szD struct {
+ name string
+ sn string
+ u []uint64
+ i []int64
+ oponly string
+}
+
+var szs = []szD{
+ {name: "uint64", sn: "64", u: []uint64{0, 1, 4294967296, 0x8000000000000000, 0xffffFFFFffffFFFF}},
+ {name: "uint64", sn: "64", u: []uint64{3, 5, 7, 9, 10, 11, 13, 19, 21, 25, 27, 37, 41, 45, 73, 81}, oponly: "mul"},
+
+ {name: "int64", sn: "64", i: []int64{-0x8000000000000000, -0x7FFFFFFFFFFFFFFF,
+ -4294967296, -1, 0, 1, 4294967296, 0x7FFFFFFFFFFFFFFE, 0x7FFFFFFFFFFFFFFF}},
+ {name: "int64", sn: "64", i: []int64{-9, -5, -3, 3, 5, 7, 9, 10, 11, 13, 19, 21, 25, 27, 37, 41, 45, 73, 81}, oponly: "mul"},
+
+ {name: "uint32", sn: "32", u: []uint64{0, 1, 4294967295}},
+ {name: "uint32", sn: "32", u: []uint64{3, 5, 7, 9, 10, 11, 13, 19, 21, 25, 27, 37, 41, 45, 73, 81}, oponly: "mul"},
+
+ {name: "int32", sn: "32", i: []int64{-0x80000000, -0x7FFFFFFF, -1, 0,
+ 1, 0x7FFFFFFF}},
+ {name: "int32", sn: "32", i: []int64{-9, -5, -3, 3, 5, 7, 9, 10, 11, 13, 19, 21, 25, 27, 37, 41, 45, 73, 81}, oponly: "mul"},
+
+ {name: "uint16", sn: "16", u: []uint64{0, 1, 65535}},
+ {name: "int16", sn: "16", i: []int64{-32768, -32767, -1, 0, 1, 32766, 32767}},
+
+ {name: "uint8", sn: "8", u: []uint64{0, 1, 255}},
+ {name: "int8", sn: "8", i: []int64{-128, -127, -1, 0, 1, 126, 127}},
+}
+
+var ops = []op{
+ {"add", "+"},
+ {"sub", "-"},
+ {"div", "/"},
+ {"mul", "*"},
+ {"lsh", "<<"},
+ {"rsh", ">>"},
+ {"mod", "%"},
+ {"and", "&"},
+ {"or", "|"},
+ {"xor", "^"},
+}
+
+// compute the result of i op j, cast as type t.
+func ansU(i, j uint64, t, op string) string {
+ var ans uint64
+ switch op {
+ case "+":
+ ans = i + j
+ case "-":
+ ans = i - j
+ case "*":
+ ans = i * j
+ case "/":
+ if j != 0 {
+ ans = i / j
+ }
+ case "%":
+ if j != 0 {
+ ans = i % j
+ }
+ case "<<":
+ ans = i << j
+ case ">>":
+ ans = i >> j
+ case "&":
+ ans = i & j
+ case "|":
+ ans = i | j
+ case "^":
+ ans = i ^ j
+ }
+ switch t {
+ case "uint32":
+ ans = uint64(uint32(ans))
+ case "uint16":
+ ans = uint64(uint16(ans))
+ case "uint8":
+ ans = uint64(uint8(ans))
+ }
+ return fmt.Sprintf("%d", ans)
+}
+
+// compute the result of i op j, cast as type t.
+func ansS(i, j int64, t, op string) string {
+ var ans int64
+ switch op {
+ case "+":
+ ans = i + j
+ case "-":
+ ans = i - j
+ case "*":
+ ans = i * j
+ case "/":
+ if j != 0 {
+ ans = i / j
+ }
+ case "%":
+ if j != 0 {
+ ans = i % j
+ }
+ case "<<":
+ ans = i << uint64(j)
+ case ">>":
+ ans = i >> uint64(j)
+ case "&":
+ ans = i & j
+ case "|":
+ ans = i | j
+ case "^":
+ ans = i ^ j
+ }
+ switch t {
+ case "int32":
+ ans = int64(int32(ans))
+ case "int16":
+ ans = int64(int16(ans))
+ case "int8":
+ ans = int64(int8(ans))
+ }
+ return fmt.Sprintf("%d", ans)
+}
+
+func main() {
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// Code generated by gen/arithConstGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package main;\n")
+ fmt.Fprintf(w, "import \"testing\"\n")
+
+ fncCnst1 := template.Must(template.New("fnc").Parse(
+ `//go:noinline
+func {{.Name}}_{{.Type_}}_{{.FNumber}}(a {{.Type_}}) {{.Type_}} { return a {{.Symbol}} {{.Number}} }
+`))
+ fncCnst2 := template.Must(template.New("fnc").Parse(
+ `//go:noinline
+func {{.Name}}_{{.FNumber}}_{{.Type_}}(a {{.Type_}}) {{.Type_}} { return {{.Number}} {{.Symbol}} a }
+`))
+
+ type fncData struct {
+ Name, Type_, Symbol, FNumber, Number string
+ }
+
+ for _, s := range szs {
+ for _, o := range ops {
+ if s.oponly != "" && s.oponly != o.name {
+ continue
+ }
+ fd := fncData{o.name, s.name, o.symbol, "", ""}
+
+ // unsigned test cases
+ if len(s.u) > 0 {
+ for _, i := range s.u {
+ fd.Number = fmt.Sprintf("%d", i)
+ fd.FNumber = strings.Replace(fd.Number, "-", "Neg", -1)
+
+ // avoid division by zero
+ if o.name != "mod" && o.name != "div" || i != 0 {
+ // introduce uint64 cast for rhs shift operands
+ // if they are too large for default uint type
+ number := fd.Number
+ if (o.name == "lsh" || o.name == "rsh") && uint64(uint32(i)) != i {
+ fd.Number = fmt.Sprintf("uint64(%s)", number)
+ }
+ fncCnst1.Execute(w, fd)
+ fd.Number = number
+ }
+
+ fncCnst2.Execute(w, fd)
+ }
+ }
+
+ // signed test cases
+ if len(s.i) > 0 {
+ // don't generate tests for shifts by signed integers
+ if o.name == "lsh" || o.name == "rsh" {
+ continue
+ }
+ for _, i := range s.i {
+ fd.Number = fmt.Sprintf("%d", i)
+ fd.FNumber = strings.Replace(fd.Number, "-", "Neg", -1)
+
+ // avoid division by zero
+ if o.name != "mod" && o.name != "div" || i != 0 {
+ fncCnst1.Execute(w, fd)
+ }
+ fncCnst2.Execute(w, fd)
+ }
+ }
+ }
+ }
+
+ vrf1 := template.Must(template.New("vrf1").Parse(`
+ test_{{.Size}}{fn: {{.Name}}_{{.FNumber}}_{{.Type_}}, fnname: "{{.Name}}_{{.FNumber}}_{{.Type_}}", in: {{.Input}}, want: {{.Ans}}},`))
+
+ vrf2 := template.Must(template.New("vrf2").Parse(`
+ test_{{.Size}}{fn: {{.Name}}_{{.Type_}}_{{.FNumber}}, fnname: "{{.Name}}_{{.Type_}}_{{.FNumber}}", in: {{.Input}}, want: {{.Ans}}},`))
+
+ type cfncData struct {
+ Size, Name, Type_, Symbol, FNumber, Number string
+ Ans, Input string
+ }
+ for _, s := range szs {
+ fmt.Fprintf(w, `
+type test_%[1]s%[2]s struct {
+ fn func (%[1]s) %[1]s
+ fnname string
+ in %[1]s
+ want %[1]s
+}
+`, s.name, s.oponly)
+ fmt.Fprintf(w, "var tests_%[1]s%[2]s =[]test_%[1]s {\n\n", s.name, s.oponly)
+
+ if len(s.u) > 0 {
+ for _, o := range ops {
+ if s.oponly != "" && s.oponly != o.name {
+ continue
+ }
+ fd := cfncData{s.name, o.name, s.name, o.symbol, "", "", "", ""}
+ for _, i := range s.u {
+ fd.Number = fmt.Sprintf("%d", i)
+ fd.FNumber = strings.Replace(fd.Number, "-", "Neg", -1)
+
+ // unsigned
+ for _, j := range s.u {
+
+ if o.name != "mod" && o.name != "div" || j != 0 {
+ fd.Ans = ansU(i, j, s.name, o.symbol)
+ fd.Input = fmt.Sprintf("%d", j)
+ if err := vrf1.Execute(w, fd); err != nil {
+ panic(err)
+ }
+ }
+
+ if o.name != "mod" && o.name != "div" || i != 0 {
+ fd.Ans = ansU(j, i, s.name, o.symbol)
+ fd.Input = fmt.Sprintf("%d", j)
+ if err := vrf2.Execute(w, fd); err != nil {
+ panic(err)
+ }
+ }
+
+ }
+ }
+
+ }
+ }
+
+ // signed
+ if len(s.i) > 0 {
+ for _, o := range ops {
+ if s.oponly != "" && s.oponly != o.name {
+ continue
+ }
+ // don't generate tests for shifts by signed integers
+ if o.name == "lsh" || o.name == "rsh" {
+ continue
+ }
+ fd := cfncData{s.name, o.name, s.name, o.symbol, "", "", "", ""}
+ for _, i := range s.i {
+ fd.Number = fmt.Sprintf("%d", i)
+ fd.FNumber = strings.Replace(fd.Number, "-", "Neg", -1)
+ for _, j := range s.i {
+ if o.name != "mod" && o.name != "div" || j != 0 {
+ fd.Ans = ansS(i, j, s.name, o.symbol)
+ fd.Input = fmt.Sprintf("%d", j)
+ if err := vrf1.Execute(w, fd); err != nil {
+ panic(err)
+ }
+ }
+
+ if o.name != "mod" && o.name != "div" || i != 0 {
+ fd.Ans = ansS(j, i, s.name, o.symbol)
+ fd.Input = fmt.Sprintf("%d", j)
+ if err := vrf2.Execute(w, fd); err != nil {
+ panic(err)
+ }
+ }
+
+ }
+ }
+
+ }
+ }
+
+ fmt.Fprintf(w, "}\n\n")
+ }
+
+ fmt.Fprint(w, `
+
+// TestArithmeticConst tests results for arithmetic operations against constants.
+func TestArithmeticConst(t *testing.T) {
+`)
+
+ for _, s := range szs {
+ fmt.Fprintf(w, `for _, test := range tests_%s%s {`, s.name, s.oponly)
+ // Use WriteString here to avoid a vet warning about formatting directives.
+ w.WriteString(`if got := test.fn(test.in); got != test.want {
+ t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
+ }
+ }
+`)
+ }
+
+ fmt.Fprint(w, `
+}
+`)
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../arithConst_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go b/src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go
new file mode 100644
index 0000000..dcdafc0
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go
@@ -0,0 +1,246 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This program generates a test to verify that the standard comparison
+// operators properly handle one const operand. The test file should be
+// generated with a known working version of go.
+// launch with `go run cmpConstGen.go` a file called cmpConst.go
+// will be written into the parent directory containing the tests
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "math/big"
+ "sort"
+)
+
+const (
+ maxU64 = (1 << 64) - 1
+ maxU32 = (1 << 32) - 1
+ maxU16 = (1 << 16) - 1
+ maxU8 = (1 << 8) - 1
+
+ maxI64 = (1 << 63) - 1
+ maxI32 = (1 << 31) - 1
+ maxI16 = (1 << 15) - 1
+ maxI8 = (1 << 7) - 1
+
+ minI64 = -(1 << 63)
+ minI32 = -(1 << 31)
+ minI16 = -(1 << 15)
+ minI8 = -(1 << 7)
+)
+
+func cmp(left *big.Int, op string, right *big.Int) bool {
+ switch left.Cmp(right) {
+ case -1: // less than
+ return op == "<" || op == "<=" || op == "!="
+ case 0: // equal
+ return op == "==" || op == "<=" || op == ">="
+ case 1: // greater than
+ return op == ">" || op == ">=" || op == "!="
+ }
+ panic("unexpected comparison value")
+}
+
+func inRange(typ string, val *big.Int) bool {
+ min, max := &big.Int{}, &big.Int{}
+ switch typ {
+ case "uint64":
+ max = max.SetUint64(maxU64)
+ case "uint32":
+ max = max.SetUint64(maxU32)
+ case "uint16":
+ max = max.SetUint64(maxU16)
+ case "uint8":
+ max = max.SetUint64(maxU8)
+ case "int64":
+ min = min.SetInt64(minI64)
+ max = max.SetInt64(maxI64)
+ case "int32":
+ min = min.SetInt64(minI32)
+ max = max.SetInt64(maxI32)
+ case "int16":
+ min = min.SetInt64(minI16)
+ max = max.SetInt64(maxI16)
+ case "int8":
+ min = min.SetInt64(minI8)
+ max = max.SetInt64(maxI8)
+ default:
+ panic("unexpected type")
+ }
+ return cmp(min, "<=", val) && cmp(val, "<=", max)
+}
+
+func getValues(typ string) []*big.Int {
+ Uint := func(v uint64) *big.Int { return big.NewInt(0).SetUint64(v) }
+ Int := func(v int64) *big.Int { return big.NewInt(0).SetInt64(v) }
+ values := []*big.Int{
+ // limits
+ Uint(maxU64),
+ Uint(maxU64 - 1),
+ Uint(maxI64 + 1),
+ Uint(maxI64),
+ Uint(maxI64 - 1),
+ Uint(maxU32 + 1),
+ Uint(maxU32),
+ Uint(maxU32 - 1),
+ Uint(maxI32 + 1),
+ Uint(maxI32),
+ Uint(maxI32 - 1),
+ Uint(maxU16 + 1),
+ Uint(maxU16),
+ Uint(maxU16 - 1),
+ Uint(maxI16 + 1),
+ Uint(maxI16),
+ Uint(maxI16 - 1),
+ Uint(maxU8 + 1),
+ Uint(maxU8),
+ Uint(maxU8 - 1),
+ Uint(maxI8 + 1),
+ Uint(maxI8),
+ Uint(maxI8 - 1),
+ Uint(0),
+ Int(minI8 + 1),
+ Int(minI8),
+ Int(minI8 - 1),
+ Int(minI16 + 1),
+ Int(minI16),
+ Int(minI16 - 1),
+ Int(minI32 + 1),
+ Int(minI32),
+ Int(minI32 - 1),
+ Int(minI64 + 1),
+ Int(minI64),
+
+ // other possibly interesting values
+ Uint(1),
+ Int(-1),
+ Uint(0xff << 56),
+ Uint(0xff << 32),
+ Uint(0xff << 24),
+ }
+ sort.Slice(values, func(i, j int) bool { return values[i].Cmp(values[j]) == -1 })
+ var ret []*big.Int
+ for _, val := range values {
+ if !inRange(typ, val) {
+ continue
+ }
+ ret = append(ret, val)
+ }
+ return ret
+}
+
+func sigString(v *big.Int) string {
+ var t big.Int
+ t.Abs(v)
+ if v.Sign() == -1 {
+ return "neg" + t.String()
+ }
+ return t.String()
+}
+
+func main() {
+ types := []string{
+ "uint64", "uint32", "uint16", "uint8",
+ "int64", "int32", "int16", "int8",
+ }
+
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// Code generated by gen/cmpConstGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package main;\n")
+ fmt.Fprintf(w, "import (\"testing\"; \"reflect\"; \"runtime\";)\n")
+ fmt.Fprintf(w, "// results show the expected result for the elements left of, equal to and right of the index.\n")
+ fmt.Fprintf(w, "type result struct{l, e, r bool}\n")
+ fmt.Fprintf(w, "var (\n")
+ fmt.Fprintf(w, " eq = result{l: false, e: true, r: false}\n")
+ fmt.Fprintf(w, " ne = result{l: true, e: false, r: true}\n")
+ fmt.Fprintf(w, " lt = result{l: true, e: false, r: false}\n")
+ fmt.Fprintf(w, " le = result{l: true, e: true, r: false}\n")
+ fmt.Fprintf(w, " gt = result{l: false, e: false, r: true}\n")
+ fmt.Fprintf(w, " ge = result{l: false, e: true, r: true}\n")
+ fmt.Fprintf(w, ")\n")
+
+ operators := []struct{ op, name string }{
+ {"<", "lt"},
+ {"<=", "le"},
+ {">", "gt"},
+ {">=", "ge"},
+ {"==", "eq"},
+ {"!=", "ne"},
+ }
+
+ for _, typ := range types {
+ // generate a slice containing valid values for this type
+ fmt.Fprintf(w, "\n// %v tests\n", typ)
+ values := getValues(typ)
+ fmt.Fprintf(w, "var %v_vals = []%v{\n", typ, typ)
+ for _, val := range values {
+ fmt.Fprintf(w, "%v,\n", val.String())
+ }
+ fmt.Fprintf(w, "}\n")
+
+ // generate test functions
+ for _, r := range values {
+ // TODO: could also test constant on lhs.
+ sig := sigString(r)
+ for _, op := range operators {
+ // no need for go:noinline because the function is called indirectly
+ fmt.Fprintf(w, "func %v_%v_%v(x %v) bool { return x %v %v; }\n", op.name, sig, typ, typ, op.op, r.String())
+ }
+ }
+
+ // generate a table of test cases
+ fmt.Fprintf(w, "var %v_tests = []struct{\n", typ)
+ fmt.Fprintf(w, " idx int // index of the constant used\n")
+ fmt.Fprintf(w, " exp result // expected results\n")
+ fmt.Fprintf(w, " fn func(%v) bool\n", typ)
+ fmt.Fprintf(w, "}{\n")
+ for i, r := range values {
+ sig := sigString(r)
+ for _, op := range operators {
+ fmt.Fprintf(w, "{idx: %v,", i)
+ fmt.Fprintf(w, "exp: %v,", op.name)
+ fmt.Fprintf(w, "fn: %v_%v_%v},\n", op.name, sig, typ)
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ }
+
+ // emit the main function, looping over all test cases
+ fmt.Fprintf(w, "// TestComparisonsConst tests results for comparison operations against constants.\n")
+ fmt.Fprintf(w, "func TestComparisonsConst(t *testing.T) {\n")
+ for _, typ := range types {
+ fmt.Fprintf(w, "for i, test := range %v_tests {\n", typ)
+ fmt.Fprintf(w, " for j, x := range %v_vals {\n", typ)
+ fmt.Fprintf(w, " want := test.exp.l\n")
+ fmt.Fprintf(w, " if j == test.idx {\nwant = test.exp.e\n}")
+ fmt.Fprintf(w, " else if j > test.idx {\nwant = test.exp.r\n}\n")
+ fmt.Fprintf(w, " if test.fn(x) != want {\n")
+ fmt.Fprintf(w, " fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()\n")
+ fmt.Fprintf(w, " t.Errorf(\"test failed: %%v(%%v) != %%v [type=%v i=%%v j=%%v idx=%%v]\", fn, x, want, i, j, test.idx)\n", typ)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+ }
+ fmt.Fprintf(w, "}\n")
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../cmpConst_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/constFoldGen.go b/src/cmd/compile/internal/test/testdata/gen/constFoldGen.go
new file mode 100644
index 0000000..7079422
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/constFoldGen.go
@@ -0,0 +1,307 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This program generates a test to verify that the standard arithmetic
+// operators properly handle constant folding. The test file should be
+// generated with a known working version of go.
+// launch with `go run constFoldGen.go` a file called constFold_test.go
+// will be written into the grandparent directory containing the tests.
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "os"
+)
+
+type op struct {
+ name, symbol string
+}
+type szD struct {
+ name string
+ sn string
+ u []uint64
+ i []int64
+}
+
+var szs []szD = []szD{
+ szD{name: "uint64", sn: "64", u: []uint64{0, 1, 4294967296, 0xffffFFFFffffFFFF}},
+ szD{name: "int64", sn: "64", i: []int64{-0x8000000000000000, -0x7FFFFFFFFFFFFFFF,
+ -4294967296, -1, 0, 1, 4294967296, 0x7FFFFFFFFFFFFFFE, 0x7FFFFFFFFFFFFFFF}},
+
+ szD{name: "uint32", sn: "32", u: []uint64{0, 1, 4294967295}},
+ szD{name: "int32", sn: "32", i: []int64{-0x80000000, -0x7FFFFFFF, -1, 0,
+ 1, 0x7FFFFFFF}},
+
+ szD{name: "uint16", sn: "16", u: []uint64{0, 1, 65535}},
+ szD{name: "int16", sn: "16", i: []int64{-32768, -32767, -1, 0, 1, 32766, 32767}},
+
+ szD{name: "uint8", sn: "8", u: []uint64{0, 1, 255}},
+ szD{name: "int8", sn: "8", i: []int64{-128, -127, -1, 0, 1, 126, 127}},
+}
+
+var ops = []op{
+ op{"add", "+"}, op{"sub", "-"}, op{"div", "/"}, op{"mul", "*"},
+ op{"lsh", "<<"}, op{"rsh", ">>"}, op{"mod", "%"},
+}
+
+// compute the result of i op j, cast as type t.
+func ansU(i, j uint64, t, op string) string {
+ var ans uint64
+ switch op {
+ case "+":
+ ans = i + j
+ case "-":
+ ans = i - j
+ case "*":
+ ans = i * j
+ case "/":
+ if j != 0 {
+ ans = i / j
+ }
+ case "%":
+ if j != 0 {
+ ans = i % j
+ }
+ case "<<":
+ ans = i << j
+ case ">>":
+ ans = i >> j
+ }
+ switch t {
+ case "uint32":
+ ans = uint64(uint32(ans))
+ case "uint16":
+ ans = uint64(uint16(ans))
+ case "uint8":
+ ans = uint64(uint8(ans))
+ }
+ return fmt.Sprintf("%d", ans)
+}
+
+// compute the result of i op j, cast as type t.
+func ansS(i, j int64, t, op string) string {
+ var ans int64
+ switch op {
+ case "+":
+ ans = i + j
+ case "-":
+ ans = i - j
+ case "*":
+ ans = i * j
+ case "/":
+ if j != 0 {
+ ans = i / j
+ }
+ case "%":
+ if j != 0 {
+ ans = i % j
+ }
+ case "<<":
+ ans = i << uint64(j)
+ case ">>":
+ ans = i >> uint64(j)
+ }
+ switch t {
+ case "int32":
+ ans = int64(int32(ans))
+ case "int16":
+ ans = int64(int16(ans))
+ case "int8":
+ ans = int64(int8(ans))
+ }
+ return fmt.Sprintf("%d", ans)
+}
+
+func main() {
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// run\n")
+ fmt.Fprintf(w, "// Code generated by gen/constFoldGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package gc\n")
+ fmt.Fprintf(w, "import \"testing\"\n")
+
+ for _, s := range szs {
+ for _, o := range ops {
+ if o.symbol == "<<" || o.symbol == ">>" {
+ // shifts handled separately below, as they can have
+ // different types on the LHS and RHS.
+ continue
+ }
+ fmt.Fprintf(w, "func TestConstFold%s%s(t *testing.T) {\n", s.name, o.name)
+ fmt.Fprintf(w, "\tvar x, y, r %s\n", s.name)
+ // unsigned test cases
+ for _, c := range s.u {
+ fmt.Fprintf(w, "\tx = %d\n", c)
+ for _, d := range s.u {
+ if d == 0 && (o.symbol == "/" || o.symbol == "%") {
+ continue
+ }
+ fmt.Fprintf(w, "\ty = %d\n", d)
+ fmt.Fprintf(w, "\tr = x %s y\n", o.symbol)
+ want := ansU(c, d, s.name, o.symbol)
+ fmt.Fprintf(w, "\tif r != %s {\n", want)
+ fmt.Fprintf(w, "\t\tt.Errorf(\"%d %%s %d = %%d, want %s\", %q, r)\n", c, d, want, o.symbol)
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ // signed test cases
+ for _, c := range s.i {
+ fmt.Fprintf(w, "\tx = %d\n", c)
+ for _, d := range s.i {
+ if d == 0 && (o.symbol == "/" || o.symbol == "%") {
+ continue
+ }
+ fmt.Fprintf(w, "\ty = %d\n", d)
+ fmt.Fprintf(w, "\tr = x %s y\n", o.symbol)
+ want := ansS(c, d, s.name, o.symbol)
+ fmt.Fprintf(w, "\tif r != %s {\n", want)
+ fmt.Fprintf(w, "\t\tt.Errorf(\"%d %%s %d = %%d, want %s\", %q, r)\n", c, d, want, o.symbol)
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ }
+ }
+
+ // Special signed/unsigned cases for shifts
+ for _, ls := range szs {
+ for _, rs := range szs {
+ if rs.name[0] != 'u' {
+ continue
+ }
+ for _, o := range ops {
+ if o.symbol != "<<" && o.symbol != ">>" {
+ continue
+ }
+ fmt.Fprintf(w, "func TestConstFold%s%s%s(t *testing.T) {\n", ls.name, rs.name, o.name)
+ fmt.Fprintf(w, "\tvar x, r %s\n", ls.name)
+ fmt.Fprintf(w, "\tvar y %s\n", rs.name)
+ // unsigned LHS
+ for _, c := range ls.u {
+ fmt.Fprintf(w, "\tx = %d\n", c)
+ for _, d := range rs.u {
+ fmt.Fprintf(w, "\ty = %d\n", d)
+ fmt.Fprintf(w, "\tr = x %s y\n", o.symbol)
+ want := ansU(c, d, ls.name, o.symbol)
+ fmt.Fprintf(w, "\tif r != %s {\n", want)
+ fmt.Fprintf(w, "\t\tt.Errorf(\"%d %%s %d = %%d, want %s\", %q, r)\n", c, d, want, o.symbol)
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ // signed LHS
+ for _, c := range ls.i {
+ fmt.Fprintf(w, "\tx = %d\n", c)
+ for _, d := range rs.u {
+ fmt.Fprintf(w, "\ty = %d\n", d)
+ fmt.Fprintf(w, "\tr = x %s y\n", o.symbol)
+ want := ansS(c, int64(d), ls.name, o.symbol)
+ fmt.Fprintf(w, "\tif r != %s {\n", want)
+ fmt.Fprintf(w, "\t\tt.Errorf(\"%d %%s %d = %%d, want %s\", %q, r)\n", c, d, want, o.symbol)
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ }
+ }
+ }
+
+ // Constant folding for comparisons
+ for _, s := range szs {
+ fmt.Fprintf(w, "func TestConstFoldCompare%s(t *testing.T) {\n", s.name)
+ for _, x := range s.i {
+ for _, y := range s.i {
+ fmt.Fprintf(w, "\t{\n")
+ fmt.Fprintf(w, "\t\tvar x %s = %d\n", s.name, x)
+ fmt.Fprintf(w, "\t\tvar y %s = %d\n", s.name, y)
+ if x == y {
+ fmt.Fprintf(w, "\t\tif !(x == y) { t.Errorf(\"!(%%d == %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x == y { t.Errorf(\"%%d == %%d\", x, y) }\n")
+ }
+ if x != y {
+ fmt.Fprintf(w, "\t\tif !(x != y) { t.Errorf(\"!(%%d != %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x != y { t.Errorf(\"%%d != %%d\", x, y) }\n")
+ }
+ if x < y {
+ fmt.Fprintf(w, "\t\tif !(x < y) { t.Errorf(\"!(%%d < %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x < y { t.Errorf(\"%%d < %%d\", x, y) }\n")
+ }
+ if x > y {
+ fmt.Fprintf(w, "\t\tif !(x > y) { t.Errorf(\"!(%%d > %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x > y { t.Errorf(\"%%d > %%d\", x, y) }\n")
+ }
+ if x <= y {
+ fmt.Fprintf(w, "\t\tif !(x <= y) { t.Errorf(\"!(%%d <= %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x <= y { t.Errorf(\"%%d <= %%d\", x, y) }\n")
+ }
+ if x >= y {
+ fmt.Fprintf(w, "\t\tif !(x >= y) { t.Errorf(\"!(%%d >= %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x >= y { t.Errorf(\"%%d >= %%d\", x, y) }\n")
+ }
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ for _, x := range s.u {
+ for _, y := range s.u {
+ fmt.Fprintf(w, "\t{\n")
+ fmt.Fprintf(w, "\t\tvar x %s = %d\n", s.name, x)
+ fmt.Fprintf(w, "\t\tvar y %s = %d\n", s.name, y)
+ if x == y {
+ fmt.Fprintf(w, "\t\tif !(x == y) { t.Errorf(\"!(%%d == %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x == y { t.Errorf(\"%%d == %%d\", x, y) }\n")
+ }
+ if x != y {
+ fmt.Fprintf(w, "\t\tif !(x != y) { t.Errorf(\"!(%%d != %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x != y { t.Errorf(\"%%d != %%d\", x, y) }\n")
+ }
+ if x < y {
+ fmt.Fprintf(w, "\t\tif !(x < y) { t.Errorf(\"!(%%d < %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x < y { t.Errorf(\"%%d < %%d\", x, y) }\n")
+ }
+ if x > y {
+ fmt.Fprintf(w, "\t\tif !(x > y) { t.Errorf(\"!(%%d > %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x > y { t.Errorf(\"%%d > %%d\", x, y) }\n")
+ }
+ if x <= y {
+ fmt.Fprintf(w, "\t\tif !(x <= y) { t.Errorf(\"!(%%d <= %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x <= y { t.Errorf(\"%%d <= %%d\", x, y) }\n")
+ }
+ if x >= y {
+ fmt.Fprintf(w, "\t\tif !(x >= y) { t.Errorf(\"!(%%d >= %%d)\", x, y) }\n")
+ } else {
+ fmt.Fprintf(w, "\t\tif x >= y { t.Errorf(\"%%d >= %%d\", x, y) }\n")
+ }
+ fmt.Fprintf(w, "\t}\n")
+ }
+ }
+ fmt.Fprintf(w, "}\n")
+ }
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../../constFold_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/copyGen.go b/src/cmd/compile/internal/test/testdata/gen/copyGen.go
new file mode 100644
index 0000000..dd09b3b
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/copyGen.go
@@ -0,0 +1,121 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "os"
+)
+
+// This program generates tests to verify that copying operations
+// copy the data they are supposed to and clobber no adjacent values.
+
+// run as `go run copyGen.go`. A file called copy.go
+// will be written into the parent directory containing the tests.
+
+var sizes = [...]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 16, 17, 23, 24, 25, 31, 32, 33, 63, 64, 65, 1023, 1024, 1025, 1024 + 7, 1024 + 8, 1024 + 9, 1024 + 15, 1024 + 16, 1024 + 17}
+
+var usizes = [...]int{2, 3, 4, 5, 6, 7}
+
+func main() {
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// Code generated by gen/copyGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package main\n")
+ fmt.Fprintf(w, "import \"testing\"\n")
+
+ for _, s := range sizes {
+ // type for test
+ fmt.Fprintf(w, "type T%d struct {\n", s)
+ fmt.Fprintf(w, " pre [8]byte\n")
+ fmt.Fprintf(w, " mid [%d]byte\n", s)
+ fmt.Fprintf(w, " post [8]byte\n")
+ fmt.Fprintf(w, "}\n")
+
+ // function being tested
+ fmt.Fprintf(w, "//go:noinline\n")
+ fmt.Fprintf(w, "func t%dcopy_ssa(y, x *[%d]byte) {\n", s, s)
+ fmt.Fprintf(w, " *y = *x\n")
+ fmt.Fprintf(w, "}\n")
+
+ // testing harness
+ fmt.Fprintf(w, "func testCopy%d(t *testing.T) {\n", s)
+ fmt.Fprintf(w, " a := T%d{[8]byte{201, 202, 203, 204, 205, 206, 207, 208},[%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "%d,", i%100)
+ }
+ fmt.Fprintf(w, "},[8]byte{211, 212, 213, 214, 215, 216, 217, 218}}\n")
+ fmt.Fprintf(w, " x := [%d]byte{", s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "%d,", 100+i%100)
+ }
+ fmt.Fprintf(w, "}\n")
+ fmt.Fprintf(w, " t%dcopy_ssa(&a.mid, &x)\n", s)
+ fmt.Fprintf(w, " want := T%d{[8]byte{201, 202, 203, 204, 205, 206, 207, 208},[%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "%d,", 100+i%100)
+ }
+ fmt.Fprintf(w, "},[8]byte{211, 212, 213, 214, 215, 216, 217, 218}}\n")
+ fmt.Fprintf(w, " if a != want {\n")
+ fmt.Fprintf(w, " t.Errorf(\"t%dcopy got=%%v, want %%v\\n\", a, want)\n", s)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+ }
+
+ for _, s := range usizes {
+ // function being tested
+ fmt.Fprintf(w, "//go:noinline\n")
+ fmt.Fprintf(w, "func tu%dcopy_ssa(docopy bool, data [%d]byte, x *[%d]byte) {\n", s, s, s)
+ fmt.Fprintf(w, " if docopy {\n")
+ fmt.Fprintf(w, " *x = data\n")
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+
+ // testing harness
+ fmt.Fprintf(w, "func testUnalignedCopy%d(t *testing.T) {\n", s)
+ fmt.Fprintf(w, " var a [%d]byte\n", s)
+ fmt.Fprintf(w, " t%d := [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, " %d,", s+i)
+ }
+ fmt.Fprintf(w, "}\n")
+ fmt.Fprintf(w, " tu%dcopy_ssa(true, t%d, &a)\n", s, s)
+ fmt.Fprintf(w, " want%d := [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, " %d,", s+i)
+ }
+ fmt.Fprintf(w, "}\n")
+ fmt.Fprintf(w, " if a != want%d {\n", s)
+ fmt.Fprintf(w, " t.Errorf(\"tu%dcopy got=%%v, want %%v\\n\", a, want%d)\n", s, s)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+ }
+
+ // boilerplate at end
+ fmt.Fprintf(w, "func TestCopy(t *testing.T) {\n")
+ for _, s := range sizes {
+ fmt.Fprintf(w, " testCopy%d(t)\n", s)
+ }
+ for _, s := range usizes {
+ fmt.Fprintf(w, " testUnalignedCopy%d(t)\n", s)
+ }
+ fmt.Fprintf(w, "}\n")
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../copy_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/gen/zeroGen.go b/src/cmd/compile/internal/test/testdata/gen/zeroGen.go
new file mode 100644
index 0000000..f3dcaa1
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/gen/zeroGen.go
@@ -0,0 +1,143 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "log"
+ "os"
+)
+
+// This program generates tests to verify that zeroing operations
+// zero the data they are supposed to and clobber no adjacent values.
+
+// run as `go run zeroGen.go`. A file called zero.go
+// will be written into the parent directory containing the tests.
+
+var sizes = [...]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 16, 17, 23, 24, 25, 31, 32, 33, 63, 64, 65, 1023, 1024, 1025}
+var usizes = [...]int{8, 16, 24, 32, 64, 256}
+
+func main() {
+ w := new(bytes.Buffer)
+ fmt.Fprintf(w, "// Code generated by gen/zeroGen.go. DO NOT EDIT.\n\n")
+ fmt.Fprintf(w, "package main\n")
+ fmt.Fprintf(w, "import \"testing\"\n")
+
+ for _, s := range sizes {
+ // type for test
+ fmt.Fprintf(w, "type Z%d struct {\n", s)
+ fmt.Fprintf(w, " pre [8]byte\n")
+ fmt.Fprintf(w, " mid [%d]byte\n", s)
+ fmt.Fprintf(w, " post [8]byte\n")
+ fmt.Fprintf(w, "}\n")
+
+ // function being tested
+ fmt.Fprintf(w, "//go:noinline\n")
+ fmt.Fprintf(w, "func zero%d_ssa(x *[%d]byte) {\n", s, s)
+ fmt.Fprintf(w, " *x = [%d]byte{}\n", s)
+ fmt.Fprintf(w, "}\n")
+
+ // testing harness
+ fmt.Fprintf(w, "func testZero%d(t *testing.T) {\n", s)
+ fmt.Fprintf(w, " a := Z%d{[8]byte{255,255,255,255,255,255,255,255},[%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "255,")
+ }
+ fmt.Fprintf(w, "},[8]byte{255,255,255,255,255,255,255,255}}\n")
+ fmt.Fprintf(w, " zero%d_ssa(&a.mid)\n", s)
+ fmt.Fprintf(w, " want := Z%d{[8]byte{255,255,255,255,255,255,255,255},[%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "0,")
+ }
+ fmt.Fprintf(w, "},[8]byte{255,255,255,255,255,255,255,255}}\n")
+ fmt.Fprintf(w, " if a != want {\n")
+ fmt.Fprintf(w, " t.Errorf(\"zero%d got=%%v, want %%v\\n\", a, want)\n", s)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+ }
+
+ for _, s := range usizes {
+ // type for test
+ fmt.Fprintf(w, "type Z%du1 struct {\n", s)
+ fmt.Fprintf(w, " b bool\n")
+ fmt.Fprintf(w, " val [%d]byte\n", s)
+ fmt.Fprintf(w, "}\n")
+
+ fmt.Fprintf(w, "type Z%du2 struct {\n", s)
+ fmt.Fprintf(w, " i uint16\n")
+ fmt.Fprintf(w, " val [%d]byte\n", s)
+ fmt.Fprintf(w, "}\n")
+
+ // function being tested
+ fmt.Fprintf(w, "//go:noinline\n")
+ fmt.Fprintf(w, "func zero%du1_ssa(t *Z%du1) {\n", s, s)
+ fmt.Fprintf(w, " t.val = [%d]byte{}\n", s)
+ fmt.Fprintf(w, "}\n")
+
+ // function being tested
+ fmt.Fprintf(w, "//go:noinline\n")
+ fmt.Fprintf(w, "func zero%du2_ssa(t *Z%du2) {\n", s, s)
+ fmt.Fprintf(w, " t.val = [%d]byte{}\n", s)
+ fmt.Fprintf(w, "}\n")
+
+ // testing harness
+ fmt.Fprintf(w, "func testZero%du(t *testing.T) {\n", s)
+ fmt.Fprintf(w, " a := Z%du1{false, [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "255,")
+ }
+ fmt.Fprintf(w, "}}\n")
+ fmt.Fprintf(w, " zero%du1_ssa(&a)\n", s)
+ fmt.Fprintf(w, " want := Z%du1{false, [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "0,")
+ }
+ fmt.Fprintf(w, "}}\n")
+ fmt.Fprintf(w, " if a != want {\n")
+ fmt.Fprintf(w, " t.Errorf(\"zero%du2 got=%%v, want %%v\\n\", a, want)\n", s)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, " b := Z%du2{15, [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "255,")
+ }
+ fmt.Fprintf(w, "}}\n")
+ fmt.Fprintf(w, " zero%du2_ssa(&b)\n", s)
+ fmt.Fprintf(w, " wantb := Z%du2{15, [%d]byte{", s, s)
+ for i := 0; i < s; i++ {
+ fmt.Fprintf(w, "0,")
+ }
+ fmt.Fprintf(w, "}}\n")
+ fmt.Fprintf(w, " if b != wantb {\n")
+ fmt.Fprintf(w, " t.Errorf(\"zero%du2 got=%%v, want %%v\\n\", b, wantb)\n", s)
+ fmt.Fprintf(w, " }\n")
+ fmt.Fprintf(w, "}\n")
+ }
+
+ // boilerplate at end
+ fmt.Fprintf(w, "func TestZero(t *testing.T) {\n")
+ for _, s := range sizes {
+ fmt.Fprintf(w, " testZero%d(t)\n", s)
+ }
+ for _, s := range usizes {
+ fmt.Fprintf(w, " testZero%du(t)\n", s)
+ }
+ fmt.Fprintf(w, "}\n")
+
+ // gofmt result
+ b := w.Bytes()
+ src, err := format.Source(b)
+ if err != nil {
+ fmt.Printf("%s\n", b)
+ panic(err)
+ }
+
+ // write to file
+ err = os.WriteFile("../zero_test.go", src, 0666)
+ if err != nil {
+ log.Fatalf("can't write output: %v\n", err)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/loadstore_test.go b/src/cmd/compile/internal/test/testdata/loadstore_test.go
new file mode 100644
index 0000000..0521728
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/loadstore_test.go
@@ -0,0 +1,205 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests load/store ordering
+
+package main
+
+import "testing"
+
+// testLoadStoreOrder tests for reordering of stores/loads.
+func testLoadStoreOrder(t *testing.T) {
+ z := uint32(1000)
+ if testLoadStoreOrder_ssa(&z, 100) == 0 {
+ t.Errorf("testLoadStoreOrder failed")
+ }
+}
+
+//go:noinline
+func testLoadStoreOrder_ssa(z *uint32, prec uint) int {
+ old := *z // load
+ *z = uint32(prec) // store
+ if *z < old { // load
+ return 1
+ }
+ return 0
+}
+
+func testStoreSize(t *testing.T) {
+ a := [4]uint16{11, 22, 33, 44}
+ testStoreSize_ssa(&a[0], &a[2], 77)
+ want := [4]uint16{77, 22, 33, 44}
+ if a != want {
+ t.Errorf("testStoreSize failed. want = %d, got = %d", want, a)
+ }
+}
+
+//go:noinline
+func testStoreSize_ssa(p *uint16, q *uint16, v uint32) {
+ // Test to make sure that (Store ptr (Trunc32to16 val) mem)
+ // does not end up as a 32-bit store. It must stay a 16 bit store
+ // even when Trunc32to16 is rewritten to be a nop.
+ // To ensure that we get rewrite the Trunc32to16 before
+ // we rewrite the Store, we force the truncate into an
+ // earlier basic block by using it on both branches.
+ w := uint16(v)
+ if p != nil {
+ *p = w
+ } else {
+ *q = w
+ }
+}
+
+//go:noinline
+func testExtStore_ssa(p *byte, b bool) int {
+ x := *p
+ *p = 7
+ if b {
+ return int(x)
+ }
+ return 0
+}
+
+func testExtStore(t *testing.T) {
+ const start = 8
+ var b byte = start
+ if got := testExtStore_ssa(&b, true); got != start {
+ t.Errorf("testExtStore failed. want = %d, got = %d", start, got)
+ }
+}
+
+var b int
+
+// testDeadStorePanic_ssa ensures that we don't optimize away stores
+// that could be read by after recover(). Modeled after fixedbugs/issue1304.
+//
+//go:noinline
+func testDeadStorePanic_ssa(a int) (r int) {
+ defer func() {
+ recover()
+ r = a
+ }()
+ a = 2 // store
+ b := a - a // optimized to zero
+ c := 4
+ a = c / b // store, but panics
+ a = 3 // store
+ r = a
+ return
+}
+
+func testDeadStorePanic(t *testing.T) {
+ if want, got := 2, testDeadStorePanic_ssa(1); want != got {
+ t.Errorf("testDeadStorePanic failed. want = %d, got = %d", want, got)
+ }
+}
+
+//go:noinline
+func loadHitStore8(x int8, p *int8) int32 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return int32(*p) // load and cast
+}
+
+//go:noinline
+func loadHitStoreU8(x uint8, p *uint8) uint32 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return uint32(*p) // load and cast
+}
+
+//go:noinline
+func loadHitStore16(x int16, p *int16) int32 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return int32(*p) // load and cast
+}
+
+//go:noinline
+func loadHitStoreU16(x uint16, p *uint16) uint32 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return uint32(*p) // load and cast
+}
+
+//go:noinline
+func loadHitStore32(x int32, p *int32) int64 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return int64(*p) // load and cast
+}
+
+//go:noinline
+func loadHitStoreU32(x uint32, p *uint32) uint64 {
+ x *= x // try to trash high bits (arch-dependent)
+ *p = x // store
+ return uint64(*p) // load and cast
+}
+
+func testLoadHitStore(t *testing.T) {
+ // Test that sign/zero extensions are kept when a load-hit-store
+ // is replaced by a register-register move.
+ {
+ var in int8 = (1 << 6) + 1
+ var p int8
+ got := loadHitStore8(in, &p)
+ want := int32(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (int8) failed. want = %d, got = %d", want, got)
+ }
+ }
+ {
+ var in uint8 = (1 << 6) + 1
+ var p uint8
+ got := loadHitStoreU8(in, &p)
+ want := uint32(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (uint8) failed. want = %d, got = %d", want, got)
+ }
+ }
+ {
+ var in int16 = (1 << 10) + 1
+ var p int16
+ got := loadHitStore16(in, &p)
+ want := int32(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (int16) failed. want = %d, got = %d", want, got)
+ }
+ }
+ {
+ var in uint16 = (1 << 10) + 1
+ var p uint16
+ got := loadHitStoreU16(in, &p)
+ want := uint32(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (uint16) failed. want = %d, got = %d", want, got)
+ }
+ }
+ {
+ var in int32 = (1 << 30) + 1
+ var p int32
+ got := loadHitStore32(in, &p)
+ want := int64(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (int32) failed. want = %d, got = %d", want, got)
+ }
+ }
+ {
+ var in uint32 = (1 << 30) + 1
+ var p uint32
+ got := loadHitStoreU32(in, &p)
+ want := uint64(in * in)
+ if got != want {
+ t.Errorf("testLoadHitStore (uint32) failed. want = %d, got = %d", want, got)
+ }
+ }
+}
+
+func TestLoadStore(t *testing.T) {
+ testLoadStoreOrder(t)
+ testStoreSize(t)
+ testExtStore(t)
+ testDeadStorePanic(t)
+ testLoadHitStore(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/map_test.go b/src/cmd/compile/internal/test/testdata/map_test.go
new file mode 100644
index 0000000..71dc820
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/map_test.go
@@ -0,0 +1,37 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// map.go tests map operations.
+package main
+
+import "testing"
+
+//go:noinline
+func lenMap_ssa(v map[int]int) int {
+ return len(v)
+}
+
+func testLenMap(t *testing.T) {
+
+ v := make(map[int]int)
+ v[0] = 0
+ v[1] = 0
+ v[2] = 0
+
+ if want, got := 3, lenMap_ssa(v); got != want {
+ t.Errorf("expected len(map) = %d, got %d", want, got)
+ }
+}
+
+func testLenNilMap(t *testing.T) {
+
+ var v map[int]int
+ if want, got := 0, lenMap_ssa(v); got != want {
+ t.Errorf("expected len(nil) = %d, got %d", want, got)
+ }
+}
+func TestMap(t *testing.T) {
+ testLenMap(t)
+ testLenNilMap(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/mysort/mysort.go b/src/cmd/compile/internal/test/testdata/mysort/mysort.go
new file mode 100644
index 0000000..14852c8
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/mysort/mysort.go
@@ -0,0 +1,40 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generic sort function, tested with two different pointer types.
+
+package mysort
+
+import (
+ "fmt"
+)
+
+type LessConstraint[T any] interface {
+ Less(T) bool
+}
+
+//go:noinline
+func Sort[T LessConstraint[T]](x []T) {
+ n := len(x)
+ for i := 1; i < n; i++ {
+ for j := i; j > 0 && x[j].Less(x[j-1]); j-- {
+ x[j], x[j-1] = x[j-1], x[j]
+ }
+ }
+}
+
+type MyInt struct {
+ Value int
+}
+
+func (a *MyInt) Less(b *MyInt) bool {
+ return a.Value < b.Value
+}
+
+//go:noinline
+func F() {
+ sl1 := []*MyInt{&MyInt{4}, &MyInt{3}, &MyInt{8}, &MyInt{7}}
+ Sort(sl1)
+ fmt.Printf("%v %v %v %v\n", sl1[0], sl1[1], sl1[2], sl1[3])
+}
diff --git a/src/cmd/compile/internal/test/testdata/namedReturn_test.go b/src/cmd/compile/internal/test/testdata/namedReturn_test.go
new file mode 100644
index 0000000..b07e225
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/namedReturn_test.go
@@ -0,0 +1,93 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This test makes sure that naming named
+// return variables in a return statement works.
+// See issue #14904.
+
+package main
+
+import (
+ "runtime"
+ "testing"
+)
+
+// Our heap-allocated object that will be GC'd incorrectly.
+// Note that we always check the second word because that's
+// where 0xdeaddeaddeaddead is written.
+type B [4]int
+
+// small (SSAable) array
+type A1 [3]*B
+
+//go:noinline
+func f1() (t A1) {
+ t[0] = &B{91, 92, 93, 94}
+ runtime.GC()
+ return t
+}
+
+// large (non-SSAable) array
+type A2 [8]*B
+
+//go:noinline
+func f2() (t A2) {
+ t[0] = &B{91, 92, 93, 94}
+ runtime.GC()
+ return t
+}
+
+// small (SSAable) struct
+type A3 struct {
+ a, b, c *B
+}
+
+//go:noinline
+func f3() (t A3) {
+ t.a = &B{91, 92, 93, 94}
+ runtime.GC()
+ return t
+}
+
+// large (non-SSAable) struct
+type A4 struct {
+ a, b, c, d, e, f *B
+}
+
+//go:noinline
+func f4() (t A4) {
+ t.a = &B{91, 92, 93, 94}
+ runtime.GC()
+ return t
+}
+
+var sink *B
+
+func f5() int {
+ b := &B{91, 92, 93, 94}
+ t := A4{b, nil, nil, nil, nil, nil}
+ sink = b // make sure b is heap allocated ...
+ sink = nil // ... but not live
+ runtime.GC()
+ t = t
+ return t.a[1]
+}
+
+func TestNamedReturn(t *testing.T) {
+ if v := f1()[0][1]; v != 92 {
+ t.Errorf("f1()[0][1]=%d, want 92\n", v)
+ }
+ if v := f2()[0][1]; v != 92 {
+ t.Errorf("f2()[0][1]=%d, want 92\n", v)
+ }
+ if v := f3().a[1]; v != 92 {
+ t.Errorf("f3().a[1]=%d, want 92\n", v)
+ }
+ if v := f4().a[1]; v != 92 {
+ t.Errorf("f4().a[1]=%d, want 92\n", v)
+ }
+ if v := f5(); v != 92 {
+ t.Errorf("f5()=%d, want 92\n", v)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go
new file mode 100644
index 0000000..390b6c3
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go
@@ -0,0 +1,73 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// WARNING: Please avoid updating this file. If this file needs to be updated,
+// then a new devirt.pprof file should be generated:
+//
+// $ cd $GOROOT/src/cmd/compile/internal/test/testdata/pgo/devirtualize/
+// $ go mod init example.com/pgo/devirtualize
+// $ go test -bench=. -cpuprofile ./devirt.pprof
+
+package devirt
+
+import "example.com/pgo/devirtualize/mult"
+
+var sink int
+
+type Adder interface {
+ Add(a, b int) int
+}
+
+type Add struct{}
+
+func (Add) Add(a, b int) int {
+ for i := 0; i < 1000; i++ {
+ sink++
+ }
+ return a + b
+}
+
+type Sub struct{}
+
+func (Sub) Add(a, b int) int {
+ for i := 0; i < 1000; i++ {
+ sink++
+ }
+ return a - b
+}
+
+// Exercise calls mostly a1 and m1.
+//
+//go:noinline
+func Exercise(iter int, a1, a2 Adder, m1, m2 mult.Multiplier) {
+ for i := 0; i < iter; i++ {
+ a := a1
+ m := m1
+ if i%10 == 0 {
+ a = a2
+ m = m2
+ }
+
+ // N.B. Profiles only distinguish calls on a per-line level,
+ // making the two calls ambiguous. However because the
+ // interfaces and implementations are mutually exclusive,
+ // devirtualization can still select the correct callee for
+ // each.
+ //
+ // If they were not mutually exclusive (for example, two Add
+ // calls), then we could not definitively select the correct
+ // callee.
+ sink += m.Multiply(42, a.Add(1, 2))
+ }
+}
+
+func init() {
+ // TODO: until https://golang.org/cl/497175 or similar lands,
+ // we need to create an explicit reference to callees
+ // in another package for devirtualization to work.
+ m := mult.Mult{}
+ m.Multiply(42, 0)
+ n := mult.NegMult{}
+ n.Multiply(42, 0)
+}
diff --git a/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.pprof b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.pprof
new file mode 100644
index 0000000..5fe5dd6
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.pprof
Binary files differ
diff --git a/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go
new file mode 100644
index 0000000..f4cbbb8
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go
@@ -0,0 +1,29 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// WARNING: Please avoid updating this file. If this file needs to be updated,
+// then a new devirt.pprof file should be generated:
+//
+// $ cd $GOROOT/src/cmd/compile/internal/test/testdata/pgo/devirtualize/
+// $ go mod init example.com/pgo/devirtualize
+// $ go test -bench=. -cpuprofile ./devirt.pprof
+
+package devirt
+
+import (
+ "testing"
+
+ "example.com/pgo/devirtualize/mult"
+)
+
+func BenchmarkDevirt(b *testing.B) {
+ var (
+ a1 Add
+ a2 Sub
+ m1 mult.Mult
+ m2 mult.NegMult
+ )
+
+ Exercise(b.N, a1, a2, m1, m2)
+}
diff --git a/src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult/mult.go b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult/mult.go
new file mode 100644
index 0000000..8a026a5
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult/mult.go
@@ -0,0 +1,32 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// WARNING: Please avoid updating this file.
+// See the warning in ../devirt.go for more details.
+
+package mult
+
+var sink int
+
+type Multiplier interface {
+ Multiply(a, b int) int
+}
+
+type Mult struct{}
+
+func (Mult) Multiply(a, b int) int {
+ for i := 0; i < 1000; i++ {
+ sink++
+ }
+ return a * b
+}
+
+type NegMult struct{}
+
+func (NegMult) Multiply(a, b int) int {
+ for i := 0; i < 1000; i++ {
+ sink++
+ }
+ return -1 * a * b
+}
diff --git a/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.go b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.go
new file mode 100644
index 0000000..9a462fd
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.go
@@ -0,0 +1,90 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// WARNING: Please avoid updating this file. If this file needs to be updated,
+// then a new inline_hot.pprof file should be generated:
+//
+// $ cd $GOROOT/src/cmd/compile/internal/test/testdata/pgo/inline/
+// $ go test -bench=. -cpuprofile ./inline_hot.pprof
+package main
+
+import (
+ "time"
+)
+
+type BS struct {
+ length uint
+ s []uint64
+}
+
+const wSize = uint(64)
+const lWSize = uint(6)
+
+func D(i uint) int {
+ return int((i + (wSize - 1)) >> lWSize)
+}
+
+func N(length uint) (bs *BS) {
+ bs = &BS{
+ length,
+ make([]uint64, D(length)),
+ }
+
+ return bs
+}
+
+func (b *BS) S(i uint) *BS {
+ b.s[i>>lWSize] |= 1 << (i & (wSize - 1))
+ return b
+}
+
+var jn = [...]byte{
+ 0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4,
+ 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5,
+ 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11,
+ 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6,
+}
+
+func T(v uint64) uint {
+ return uint(jn[((v&-v)*0x03f79d71b4ca8b09)>>58])
+}
+
+func (b *BS) NS(i uint) (uint, bool) {
+ x := int(i >> lWSize)
+ if x >= len(b.s) {
+ return 0, false
+ }
+ w := b.s[x]
+ w = w >> (i & (wSize - 1))
+ if w != 0 {
+ return i + T(w), true
+ }
+ x = x + 1
+ for x < len(b.s) {
+ if b.s[x] != 0 {
+ return uint(x)*wSize + T(b.s[x]), true
+ }
+ x = x + 1
+
+ }
+ return 0, false
+}
+
+func A() {
+ s := N(100000)
+ for i := 0; i < 1000; i += 30 {
+ s.S(uint(i))
+ }
+ for j := 0; j < 1000; j++ {
+ c := uint(0)
+ for i, e := s.NS(0); e; i, e = s.NS(i + 1) {
+ c++
+ }
+ }
+}
+
+func main() {
+ time.Sleep(time.Second)
+ A()
+}
diff --git a/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof
new file mode 100644
index 0000000..1b55ed1
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof
Binary files differ
diff --git a/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot_test.go b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot_test.go
new file mode 100644
index 0000000..2725c57
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot_test.go
@@ -0,0 +1,51 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// WARNING: Please avoid updating this file. If this file needs to be updated,
+// then a new inline_hot.pprof file should be generated:
+//
+// $ cd $GOROOT/src/cmd/compile/internal/test/testdata/pgo/inline/
+// $ go test -bench=. -cpuprofile ./inline_hot.pprof
+package main
+
+import "testing"
+
+func BenchmarkA(b *testing.B) {
+ benchmarkB(b)
+}
+func benchmarkB(b *testing.B) {
+
+ for i := 0; true; {
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ A()
+ i = i + 1
+ if i >= b.N {
+ break
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/phi_test.go b/src/cmd/compile/internal/test/testdata/phi_test.go
new file mode 100644
index 0000000..c8a73ff
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/phi_test.go
@@ -0,0 +1,99 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+// Test to make sure spills of cast-shortened values
+// don't end up spilling the pre-shortened size instead
+// of the post-shortened size.
+
+import (
+ "runtime"
+ "testing"
+)
+
+var data1 [26]int32
+var data2 [26]int64
+
+func init() {
+ for i := 0; i < 26; i++ {
+ // If we spill all 8 bytes of this datum, the 1 in the high-order 4 bytes
+ // will overwrite some other variable in the stack frame.
+ data2[i] = 0x100000000
+ }
+}
+
+func foo() int32 {
+ var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z int32
+ if always {
+ a = data1[0]
+ b = data1[1]
+ c = data1[2]
+ d = data1[3]
+ e = data1[4]
+ f = data1[5]
+ g = data1[6]
+ h = data1[7]
+ i = data1[8]
+ j = data1[9]
+ k = data1[10]
+ l = data1[11]
+ m = data1[12]
+ n = data1[13]
+ o = data1[14]
+ p = data1[15]
+ q = data1[16]
+ r = data1[17]
+ s = data1[18]
+ t = data1[19]
+ u = data1[20]
+ v = data1[21]
+ w = data1[22]
+ x = data1[23]
+ y = data1[24]
+ z = data1[25]
+ } else {
+ a = int32(data2[0])
+ b = int32(data2[1])
+ c = int32(data2[2])
+ d = int32(data2[3])
+ e = int32(data2[4])
+ f = int32(data2[5])
+ g = int32(data2[6])
+ h = int32(data2[7])
+ i = int32(data2[8])
+ j = int32(data2[9])
+ k = int32(data2[10])
+ l = int32(data2[11])
+ m = int32(data2[12])
+ n = int32(data2[13])
+ o = int32(data2[14])
+ p = int32(data2[15])
+ q = int32(data2[16])
+ r = int32(data2[17])
+ s = int32(data2[18])
+ t = int32(data2[19])
+ u = int32(data2[20])
+ v = int32(data2[21])
+ w = int32(data2[22])
+ x = int32(data2[23])
+ y = int32(data2[24])
+ z = int32(data2[25])
+ }
+ // Lots of phis of the form phi(int32,int64) of type int32 happen here.
+ // Some will be stack phis. For those stack phis, make sure the spill
+ // of the second argument uses the phi's width (4 bytes), not its width
+ // (8 bytes). Otherwise, a random stack slot gets clobbered.
+
+ runtime.Gosched()
+ return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
+}
+
+func TestPhi(t *testing.T) {
+ want := int32(0)
+ got := foo()
+ if got != want {
+ t.Fatalf("want %d, got %d\n", want, got)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/ptrsort.go b/src/cmd/compile/internal/test/testdata/ptrsort.go
new file mode 100644
index 0000000..d26ba58
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/ptrsort.go
@@ -0,0 +1,30 @@
+package main
+
+// Test generic sort function with two different pointer types in different packages,
+// make sure only one instantiation is created.
+
+import (
+ "fmt"
+
+ "cmd/compile/internal/test/testdata/mysort"
+)
+
+type MyString struct {
+ string
+}
+
+func (a *MyString) Less(b *MyString) bool {
+ return a.string < b.string
+}
+
+func main() {
+ mysort.F()
+
+ sl1 := []*mysort.MyInt{{7}, {1}, {4}, {6}}
+ mysort.Sort(sl1)
+ fmt.Printf("%v %v %v %v\n", sl1[0], sl1[1], sl1[2], sl1[3])
+
+ sl2 := []*MyString{{"when"}, {"in"}, {"the"}, {"course"}, {"of"}}
+ mysort.Sort(sl2)
+ fmt.Printf("%v %v %v %v %v\n", sl2[0], sl2[1], sl2[2], sl2[3], sl2[4])
+}
diff --git a/src/cmd/compile/internal/test/testdata/ptrsort.out b/src/cmd/compile/internal/test/testdata/ptrsort.out
new file mode 100644
index 0000000..41f1621
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/ptrsort.out
@@ -0,0 +1,3 @@
+&{3} &{4} &{7} &{8}
+&{1} &{4} &{6} &{7}
+&{course} &{in} &{of} &{the} &{when}
diff --git a/src/cmd/compile/internal/test/testdata/regalloc_test.go b/src/cmd/compile/internal/test/testdata/regalloc_test.go
new file mode 100644
index 0000000..577f8e7
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/regalloc_test.go
@@ -0,0 +1,50 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests phi implementation
+
+package main
+
+import "testing"
+
+func phiOverwrite_ssa() int {
+ var n int
+ for i := 0; i < 10; i++ {
+ if i == 6 {
+ break
+ }
+ n = i
+ }
+ return n
+}
+
+func phiOverwrite(t *testing.T) {
+ want := 5
+ got := phiOverwrite_ssa()
+ if got != want {
+ t.Errorf("phiOverwrite_ssa()= %d, got %d", want, got)
+ }
+}
+
+func phiOverwriteBig_ssa() int {
+ var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z int
+ a = 1
+ for idx := 0; idx < 26; idx++ {
+ a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z = b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a
+ }
+ return a*1 + b*2 + c*3 + d*4 + e*5 + f*6 + g*7 + h*8 + i*9 + j*10 + k*11 + l*12 + m*13 + n*14 + o*15 + p*16 + q*17 + r*18 + s*19 + t*20 + u*21 + v*22 + w*23 + x*24 + y*25 + z*26
+}
+
+func phiOverwriteBig(t *testing.T) {
+ want := 1
+ got := phiOverwriteBig_ssa()
+ if got != want {
+ t.Errorf("phiOverwriteBig_ssa()= %d, got %d", want, got)
+ }
+}
+
+func TestRegalloc(t *testing.T) {
+ phiOverwrite(t)
+ phiOverwriteBig(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/reproducible/issue20272.go b/src/cmd/compile/internal/test/testdata/reproducible/issue20272.go
new file mode 100644
index 0000000..3db0b8a
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/reproducible/issue20272.go
@@ -0,0 +1,34 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+var (
+ i0 uint8
+ b0 byte
+
+ i1 *uint8
+ b1 *byte
+
+ i2 **uint8
+ b2 **byte
+
+ i3 ***uint8
+ b3 ***byte
+
+ i4 ****uint8
+ b4 ****byte
+
+ i5 *****uint8
+ b5 *****byte
+
+ i6 ******uint8
+ b6 ******byte
+
+ i7 *******uint8
+ b7 *******byte
+
+ i8 ********uint8
+ b8 ********byte
+)
diff --git a/src/cmd/compile/internal/test/testdata/reproducible/issue27013.go b/src/cmd/compile/internal/test/testdata/reproducible/issue27013.go
new file mode 100644
index 0000000..817f4a6
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/reproducible/issue27013.go
@@ -0,0 +1,15 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func A(arg interface{}) {
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+}
diff --git a/src/cmd/compile/internal/test/testdata/reproducible/issue30202.go b/src/cmd/compile/internal/test/testdata/reproducible/issue30202.go
new file mode 100644
index 0000000..7b5de2c
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/reproducible/issue30202.go
@@ -0,0 +1,17 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func A(x interface {
+ X() int
+}) int {
+ return x.X()
+}
+
+func B(x interface {
+ X() int
+}) int {
+ return x.X()
+}
diff --git a/src/cmd/compile/internal/test/testdata/reproducible/issue38068.go b/src/cmd/compile/internal/test/testdata/reproducible/issue38068.go
new file mode 100644
index 0000000..b87daed
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/reproducible/issue38068.go
@@ -0,0 +1,70 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue38068
+
+// A type with a couple of inlinable, non-pointer-receiver methods
+// that have params and local variables.
+type A struct {
+ s string
+ next *A
+ prev *A
+}
+
+// Inlinable, value-received method with locals and parms.
+func (a A) double(x string, y int) string {
+ if y == 191 {
+ a.s = ""
+ }
+ q := a.s + "a"
+ r := a.s + "b"
+ return q + r
+}
+
+// Inlinable, value-received method with locals and parms.
+func (a A) triple(x string, y int) string {
+ q := a.s
+ if y == 998877 {
+ a.s = x
+ }
+ r := a.s + a.s
+ return q + r
+}
+
+type methods struct {
+ m1 func(a *A, x string, y int) string
+ m2 func(a *A, x string, y int) string
+}
+
+// Now a function that makes references to the methods via pointers,
+// which should trigger the wrapper generation.
+func P(a *A, ms *methods) {
+ if a != nil {
+ defer func() { println("done") }()
+ }
+ println(ms.m1(a, "a", 2))
+ println(ms.m2(a, "b", 3))
+}
+
+func G(x *A, n int) {
+ if n <= 0 {
+ println(n)
+ return
+ }
+ // Address-taken local of type A, which will insure that the
+ // compiler's writeType() routine will create a method wrapper.
+ var a, b A
+ a.next = x
+ a.prev = &b
+ x = &a
+ G(x, n-2)
+}
+
+var M methods
+
+func F() {
+ M.m1 = (*A).double
+ M.m2 = (*A).triple
+ G(nil, 100)
+}
diff --git a/src/cmd/compile/internal/test/testdata/short_test.go b/src/cmd/compile/internal/test/testdata/short_test.go
new file mode 100644
index 0000000..7a743b5
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/short_test.go
@@ -0,0 +1,57 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests short circuiting.
+
+package main
+
+import "testing"
+
+func and_ssa(arg1, arg2 bool) bool {
+ return arg1 && rightCall(arg2)
+}
+
+func or_ssa(arg1, arg2 bool) bool {
+ return arg1 || rightCall(arg2)
+}
+
+var rightCalled bool
+
+//go:noinline
+func rightCall(v bool) bool {
+ rightCalled = true
+ return v
+ panic("unreached")
+}
+
+func testAnd(t *testing.T, arg1, arg2, wantRes bool) {
+ testShortCircuit(t, "AND", arg1, arg2, and_ssa, arg1, wantRes)
+}
+func testOr(t *testing.T, arg1, arg2, wantRes bool) {
+ testShortCircuit(t, "OR", arg1, arg2, or_ssa, !arg1, wantRes)
+}
+
+func testShortCircuit(t *testing.T, opName string, arg1, arg2 bool, fn func(bool, bool) bool, wantRightCall, wantRes bool) {
+ rightCalled = false
+ got := fn(arg1, arg2)
+ if rightCalled != wantRightCall {
+ t.Errorf("failed for %t %s %t; rightCalled=%t want=%t", arg1, opName, arg2, rightCalled, wantRightCall)
+ }
+ if wantRes != got {
+ t.Errorf("failed for %t %s %t; res=%t want=%t", arg1, opName, arg2, got, wantRes)
+ }
+}
+
+// TestShortCircuit tests OANDAND and OOROR expressions and short circuiting.
+func TestShortCircuit(t *testing.T) {
+ testAnd(t, false, false, false)
+ testAnd(t, false, true, false)
+ testAnd(t, true, false, false)
+ testAnd(t, true, true, true)
+
+ testOr(t, false, false, false)
+ testOr(t, false, true, true)
+ testOr(t, true, false, true)
+ testOr(t, true, true, true)
+}
diff --git a/src/cmd/compile/internal/test/testdata/slice_test.go b/src/cmd/compile/internal/test/testdata/slice_test.go
new file mode 100644
index 0000000..c134578
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/slice_test.go
@@ -0,0 +1,46 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This test makes sure that t.s = t.s[0:x] doesn't write
+// either the slice pointer or the capacity.
+// See issue #14855.
+
+package main
+
+import "testing"
+
+const N = 1000000
+
+type X struct {
+ s []int
+}
+
+func TestSlice(t *testing.T) {
+ done := make(chan struct{})
+ a := make([]int, N+10)
+
+ x := &X{a}
+
+ go func() {
+ for i := 0; i < N; i++ {
+ x.s = x.s[1:9]
+ }
+ done <- struct{}{}
+ }()
+ go func() {
+ for i := 0; i < N; i++ {
+ x.s = x.s[0:8] // should only write len
+ }
+ done <- struct{}{}
+ }()
+ <-done
+ <-done
+
+ if cap(x.s) != cap(a)-N {
+ t.Errorf("wanted cap=%d, got %d\n", cap(a)-N, cap(x.s))
+ }
+ if &x.s[0] != &a[N] {
+ t.Errorf("wanted ptr=%p, got %p\n", &a[N], &x.s[0])
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/sqrtConst_test.go b/src/cmd/compile/internal/test/testdata/sqrtConst_test.go
new file mode 100644
index 0000000..5b7a149
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/sqrtConst_test.go
@@ -0,0 +1,50 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "math"
+ "testing"
+)
+
+var tests = [...]struct {
+ name string
+ in float64 // used for error messages, not an input
+ got float64
+ want float64
+}{
+ {"sqrt0", 0, math.Sqrt(0), 0},
+ {"sqrt1", 1, math.Sqrt(1), 1},
+ {"sqrt2", 2, math.Sqrt(2), math.Sqrt2},
+ {"sqrt4", 4, math.Sqrt(4), 2},
+ {"sqrt100", 100, math.Sqrt(100), 10},
+ {"sqrt101", 101, math.Sqrt(101), 10.04987562112089},
+}
+
+var nanTests = [...]struct {
+ name string
+ in float64 // used for error messages, not an input
+ got float64
+}{
+ {"sqrtNaN", math.NaN(), math.Sqrt(math.NaN())},
+ {"sqrtNegative", -1, math.Sqrt(-1)},
+ {"sqrtNegInf", math.Inf(-1), math.Sqrt(math.Inf(-1))},
+}
+
+func TestSqrtConst(t *testing.T) {
+ for _, test := range tests {
+ if test.got != test.want {
+ t.Errorf("%s: math.Sqrt(%f): got %f, want %f\n", test.name, test.in, test.got, test.want)
+ }
+ }
+ for _, test := range nanTests {
+ if math.IsNaN(test.got) != true {
+ t.Errorf("%s: math.Sqrt(%f): got %f, want NaN\n", test.name, test.in, test.got)
+ }
+ }
+ if got := math.Sqrt(math.Inf(1)); !math.IsInf(got, 1) {
+ t.Errorf("math.Sqrt(+Inf), got %f, want +Inf\n", got)
+ }
+}
diff --git a/src/cmd/compile/internal/test/testdata/string_test.go b/src/cmd/compile/internal/test/testdata/string_test.go
new file mode 100644
index 0000000..5d086f0
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/string_test.go
@@ -0,0 +1,207 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// string_ssa.go tests string operations.
+package main
+
+import "testing"
+
+//go:noinline
+func testStringSlice1_ssa(a string, i, j int) string {
+ return a[i:]
+}
+
+//go:noinline
+func testStringSlice2_ssa(a string, i, j int) string {
+ return a[:j]
+}
+
+//go:noinline
+func testStringSlice12_ssa(a string, i, j int) string {
+ return a[i:j]
+}
+
+func testStringSlice(t *testing.T) {
+ tests := [...]struct {
+ fn func(string, int, int) string
+ s string
+ low, high int
+ want string
+ }{
+ // -1 means the value is not used.
+ {testStringSlice1_ssa, "foobar", 0, -1, "foobar"},
+ {testStringSlice1_ssa, "foobar", 3, -1, "bar"},
+ {testStringSlice1_ssa, "foobar", 6, -1, ""},
+ {testStringSlice2_ssa, "foobar", -1, 0, ""},
+ {testStringSlice2_ssa, "foobar", -1, 3, "foo"},
+ {testStringSlice2_ssa, "foobar", -1, 6, "foobar"},
+ {testStringSlice12_ssa, "foobar", 0, 6, "foobar"},
+ {testStringSlice12_ssa, "foobar", 0, 0, ""},
+ {testStringSlice12_ssa, "foobar", 6, 6, ""},
+ {testStringSlice12_ssa, "foobar", 1, 5, "ooba"},
+ {testStringSlice12_ssa, "foobar", 3, 3, ""},
+ {testStringSlice12_ssa, "", 0, 0, ""},
+ }
+
+ for i, test := range tests {
+ if got := test.fn(test.s, test.low, test.high); test.want != got {
+ t.Errorf("#%d %s[%d,%d] = %s, want %s", i, test.s, test.low, test.high, got, test.want)
+ }
+ }
+}
+
+type prefix struct {
+ prefix string
+}
+
+func (p *prefix) slice_ssa() {
+ p.prefix = p.prefix[:3]
+}
+
+//go:noinline
+func testStructSlice(t *testing.T) {
+ p := &prefix{"prefix"}
+ p.slice_ssa()
+ if "pre" != p.prefix {
+ t.Errorf("wrong field slice: wanted %s got %s", "pre", p.prefix)
+ }
+}
+
+func testStringSlicePanic(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ //println("panicked as expected")
+ }
+ }()
+
+ str := "foobar"
+ t.Errorf("got %s and expected to panic, but didn't", testStringSlice12_ssa(str, 3, 9))
+}
+
+const _Accuracy_name = "BelowExactAbove"
+
+var _Accuracy_index = [...]uint8{0, 5, 10, 15}
+
+//go:noinline
+func testSmallIndexType_ssa(i int) string {
+ return _Accuracy_name[_Accuracy_index[i]:_Accuracy_index[i+1]]
+}
+
+func testSmallIndexType(t *testing.T) {
+ tests := []struct {
+ i int
+ want string
+ }{
+ {0, "Below"},
+ {1, "Exact"},
+ {2, "Above"},
+ }
+
+ for i, test := range tests {
+ if got := testSmallIndexType_ssa(test.i); got != test.want {
+ t.Errorf("#%d got %s wanted %s", i, got, test.want)
+ }
+ }
+}
+
+//go:noinline
+func testInt64Index_ssa(s string, i int64) byte {
+ return s[i]
+}
+
+//go:noinline
+func testInt64Slice_ssa(s string, i, j int64) string {
+ return s[i:j]
+}
+
+func testInt64Index(t *testing.T) {
+ tests := []struct {
+ i int64
+ j int64
+ b byte
+ s string
+ }{
+ {0, 5, 'B', "Below"},
+ {5, 10, 'E', "Exact"},
+ {10, 15, 'A', "Above"},
+ }
+
+ str := "BelowExactAbove"
+ for i, test := range tests {
+ if got := testInt64Index_ssa(str, test.i); got != test.b {
+ t.Errorf("#%d got %d wanted %d", i, got, test.b)
+ }
+ if got := testInt64Slice_ssa(str, test.i, test.j); got != test.s {
+ t.Errorf("#%d got %s wanted %s", i, got, test.s)
+ }
+ }
+}
+
+func testInt64IndexPanic(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ //println("panicked as expected")
+ }
+ }()
+
+ str := "foobar"
+ t.Errorf("got %d and expected to panic, but didn't", testInt64Index_ssa(str, 1<<32+1))
+}
+
+func testInt64SlicePanic(t *testing.T) {
+ defer func() {
+ if r := recover(); r != nil {
+ //println("panicked as expected")
+ }
+ }()
+
+ str := "foobar"
+ t.Errorf("got %s and expected to panic, but didn't", testInt64Slice_ssa(str, 1<<32, 1<<32+1))
+}
+
+//go:noinline
+func testStringElem_ssa(s string, i int) byte {
+ return s[i]
+}
+
+func testStringElem(t *testing.T) {
+ tests := []struct {
+ s string
+ i int
+ n byte
+ }{
+ {"foobar", 3, 98},
+ {"foobar", 0, 102},
+ {"foobar", 5, 114},
+ }
+ for _, test := range tests {
+ if got := testStringElem_ssa(test.s, test.i); got != test.n {
+ t.Errorf("testStringElem \"%s\"[%d] = %d, wanted %d", test.s, test.i, got, test.n)
+ }
+ }
+}
+
+//go:noinline
+func testStringElemConst_ssa(i int) byte {
+ s := "foobar"
+ return s[i]
+}
+
+func testStringElemConst(t *testing.T) {
+ if got := testStringElemConst_ssa(3); got != 98 {
+ t.Errorf("testStringElemConst= %d, wanted 98", got)
+ }
+}
+
+func TestString(t *testing.T) {
+ testStringSlice(t)
+ testStringSlicePanic(t)
+ testStructSlice(t)
+ testSmallIndexType(t)
+ testStringElem(t)
+ testStringElemConst(t)
+ testInt64Index(t)
+ testInt64IndexPanic(t)
+ testInt64SlicePanic(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/unsafe_test.go b/src/cmd/compile/internal/test/testdata/unsafe_test.go
new file mode 100644
index 0000000..37599d3
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/unsafe_test.go
@@ -0,0 +1,145 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "runtime"
+ "testing"
+ "unsafe"
+)
+
+// global pointer slot
+var a *[8]uint
+
+// unfoldable true
+var always = true
+
+// Test to make sure that a pointer value which is alive
+// across a call is retained, even when there are matching
+// conversions to/from uintptr around the call.
+// We arrange things very carefully to have to/from
+// conversions on either side of the call which cannot be
+// combined with any other conversions.
+func f_ssa() *[8]uint {
+ // Make x a uintptr pointing to where a points.
+ var x uintptr
+ if always {
+ x = uintptr(unsafe.Pointer(a))
+ } else {
+ x = 0
+ }
+ // Clobber the global pointer. The only live ref
+ // to the allocated object is now x.
+ a = nil
+
+ // Convert to pointer so it should hold
+ // the object live across GC call.
+ p := unsafe.Pointer(x)
+
+ // Call gc.
+ runtime.GC()
+
+ // Convert back to uintptr.
+ y := uintptr(p)
+
+ // Mess with y so that the subsequent cast
+ // to unsafe.Pointer can't be combined with the
+ // uintptr cast above.
+ var z uintptr
+ if always {
+ z = y
+ } else {
+ z = 0
+ }
+ return (*[8]uint)(unsafe.Pointer(z))
+}
+
+// g_ssa is the same as f_ssa, but with a bit of pointer
+// arithmetic for added insanity.
+func g_ssa() *[7]uint {
+ // Make x a uintptr pointing to where a points.
+ var x uintptr
+ if always {
+ x = uintptr(unsafe.Pointer(a))
+ } else {
+ x = 0
+ }
+ // Clobber the global pointer. The only live ref
+ // to the allocated object is now x.
+ a = nil
+
+ // Offset x by one int.
+ x += unsafe.Sizeof(int(0))
+
+ // Convert to pointer so it should hold
+ // the object live across GC call.
+ p := unsafe.Pointer(x)
+
+ // Call gc.
+ runtime.GC()
+
+ // Convert back to uintptr.
+ y := uintptr(p)
+
+ // Mess with y so that the subsequent cast
+ // to unsafe.Pointer can't be combined with the
+ // uintptr cast above.
+ var z uintptr
+ if always {
+ z = y
+ } else {
+ z = 0
+ }
+ return (*[7]uint)(unsafe.Pointer(z))
+}
+
+func testf(t *testing.T) {
+ a = new([8]uint)
+ for i := 0; i < 8; i++ {
+ a[i] = 0xabcd
+ }
+ c := f_ssa()
+ for i := 0; i < 8; i++ {
+ if c[i] != 0xabcd {
+ t.Fatalf("%d:%x\n", i, c[i])
+ }
+ }
+}
+
+func testg(t *testing.T) {
+ a = new([8]uint)
+ for i := 0; i < 8; i++ {
+ a[i] = 0xabcd
+ }
+ c := g_ssa()
+ for i := 0; i < 7; i++ {
+ if c[i] != 0xabcd {
+ t.Fatalf("%d:%x\n", i, c[i])
+ }
+ }
+}
+
+func alias_ssa(ui64 *uint64, ui32 *uint32) uint32 {
+ *ui32 = 0xffffffff
+ *ui64 = 0 // store
+ ret := *ui32 // load from same address, should be zero
+ *ui64 = 0xffffffffffffffff // store
+ return ret
+}
+func testdse(t *testing.T) {
+ x := int64(-1)
+ // construct two pointers that alias one another
+ ui64 := (*uint64)(unsafe.Pointer(&x))
+ ui32 := (*uint32)(unsafe.Pointer(&x))
+ if want, got := uint32(0), alias_ssa(ui64, ui32); got != want {
+ t.Fatalf("alias_ssa: wanted %d, got %d\n", want, got)
+ }
+}
+
+func TestUnsafe(t *testing.T) {
+ testf(t)
+ testg(t)
+ testdse(t)
+}
diff --git a/src/cmd/compile/internal/test/testdata/zero_test.go b/src/cmd/compile/internal/test/testdata/zero_test.go
new file mode 100644
index 0000000..64fa25e
--- /dev/null
+++ b/src/cmd/compile/internal/test/testdata/zero_test.go
@@ -0,0 +1,711 @@
+// Code generated by gen/zeroGen.go. DO NOT EDIT.
+
+package main
+
+import "testing"
+
+type Z1 struct {
+ pre [8]byte
+ mid [1]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero1_ssa(x *[1]byte) {
+ *x = [1]byte{}
+}
+func testZero1(t *testing.T) {
+ a := Z1{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1]byte{255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero1_ssa(&a.mid)
+ want := Z1{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1]byte{0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero1 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z2 struct {
+ pre [8]byte
+ mid [2]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero2_ssa(x *[2]byte) {
+ *x = [2]byte{}
+}
+func testZero2(t *testing.T) {
+ a := Z2{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [2]byte{255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero2_ssa(&a.mid)
+ want := Z2{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [2]byte{0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero2 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z3 struct {
+ pre [8]byte
+ mid [3]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero3_ssa(x *[3]byte) {
+ *x = [3]byte{}
+}
+func testZero3(t *testing.T) {
+ a := Z3{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [3]byte{255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero3_ssa(&a.mid)
+ want := Z3{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [3]byte{0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero3 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z4 struct {
+ pre [8]byte
+ mid [4]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero4_ssa(x *[4]byte) {
+ *x = [4]byte{}
+}
+func testZero4(t *testing.T) {
+ a := Z4{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [4]byte{255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero4_ssa(&a.mid)
+ want := Z4{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [4]byte{0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero4 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z5 struct {
+ pre [8]byte
+ mid [5]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero5_ssa(x *[5]byte) {
+ *x = [5]byte{}
+}
+func testZero5(t *testing.T) {
+ a := Z5{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [5]byte{255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero5_ssa(&a.mid)
+ want := Z5{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [5]byte{0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero5 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z6 struct {
+ pre [8]byte
+ mid [6]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero6_ssa(x *[6]byte) {
+ *x = [6]byte{}
+}
+func testZero6(t *testing.T) {
+ a := Z6{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [6]byte{255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero6_ssa(&a.mid)
+ want := Z6{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [6]byte{0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero6 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z7 struct {
+ pre [8]byte
+ mid [7]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero7_ssa(x *[7]byte) {
+ *x = [7]byte{}
+}
+func testZero7(t *testing.T) {
+ a := Z7{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [7]byte{255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero7_ssa(&a.mid)
+ want := Z7{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [7]byte{0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero7 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z8 struct {
+ pre [8]byte
+ mid [8]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero8_ssa(x *[8]byte) {
+ *x = [8]byte{}
+}
+func testZero8(t *testing.T) {
+ a := Z8{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero8_ssa(&a.mid)
+ want := Z8{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero8 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z9 struct {
+ pre [8]byte
+ mid [9]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero9_ssa(x *[9]byte) {
+ *x = [9]byte{}
+}
+func testZero9(t *testing.T) {
+ a := Z9{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [9]byte{255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero9_ssa(&a.mid)
+ want := Z9{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [9]byte{0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero9 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z10 struct {
+ pre [8]byte
+ mid [10]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero10_ssa(x *[10]byte) {
+ *x = [10]byte{}
+}
+func testZero10(t *testing.T) {
+ a := Z10{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [10]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero10_ssa(&a.mid)
+ want := Z10{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [10]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero10 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z15 struct {
+ pre [8]byte
+ mid [15]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero15_ssa(x *[15]byte) {
+ *x = [15]byte{}
+}
+func testZero15(t *testing.T) {
+ a := Z15{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [15]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero15_ssa(&a.mid)
+ want := Z15{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [15]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero15 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z16 struct {
+ pre [8]byte
+ mid [16]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero16_ssa(x *[16]byte) {
+ *x = [16]byte{}
+}
+func testZero16(t *testing.T) {
+ a := Z16{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [16]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero16_ssa(&a.mid)
+ want := Z16{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero16 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z17 struct {
+ pre [8]byte
+ mid [17]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero17_ssa(x *[17]byte) {
+ *x = [17]byte{}
+}
+func testZero17(t *testing.T) {
+ a := Z17{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [17]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero17_ssa(&a.mid)
+ want := Z17{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [17]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero17 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z23 struct {
+ pre [8]byte
+ mid [23]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero23_ssa(x *[23]byte) {
+ *x = [23]byte{}
+}
+func testZero23(t *testing.T) {
+ a := Z23{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [23]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero23_ssa(&a.mid)
+ want := Z23{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [23]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero23 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z24 struct {
+ pre [8]byte
+ mid [24]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero24_ssa(x *[24]byte) {
+ *x = [24]byte{}
+}
+func testZero24(t *testing.T) {
+ a := Z24{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [24]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero24_ssa(&a.mid)
+ want := Z24{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [24]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero24 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z25 struct {
+ pre [8]byte
+ mid [25]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero25_ssa(x *[25]byte) {
+ *x = [25]byte{}
+}
+func testZero25(t *testing.T) {
+ a := Z25{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [25]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero25_ssa(&a.mid)
+ want := Z25{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [25]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero25 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z31 struct {
+ pre [8]byte
+ mid [31]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero31_ssa(x *[31]byte) {
+ *x = [31]byte{}
+}
+func testZero31(t *testing.T) {
+ a := Z31{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [31]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero31_ssa(&a.mid)
+ want := Z31{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [31]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero31 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z32 struct {
+ pre [8]byte
+ mid [32]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero32_ssa(x *[32]byte) {
+ *x = [32]byte{}
+}
+func testZero32(t *testing.T) {
+ a := Z32{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [32]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero32_ssa(&a.mid)
+ want := Z32{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero32 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z33 struct {
+ pre [8]byte
+ mid [33]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero33_ssa(x *[33]byte) {
+ *x = [33]byte{}
+}
+func testZero33(t *testing.T) {
+ a := Z33{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [33]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero33_ssa(&a.mid)
+ want := Z33{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [33]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero33 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z63 struct {
+ pre [8]byte
+ mid [63]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero63_ssa(x *[63]byte) {
+ *x = [63]byte{}
+}
+func testZero63(t *testing.T) {
+ a := Z63{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [63]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero63_ssa(&a.mid)
+ want := Z63{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [63]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero63 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z64 struct {
+ pre [8]byte
+ mid [64]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero64_ssa(x *[64]byte) {
+ *x = [64]byte{}
+}
+func testZero64(t *testing.T) {
+ a := Z64{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [64]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero64_ssa(&a.mid)
+ want := Z64{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [64]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero64 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z65 struct {
+ pre [8]byte
+ mid [65]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero65_ssa(x *[65]byte) {
+ *x = [65]byte{}
+}
+func testZero65(t *testing.T) {
+ a := Z65{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [65]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero65_ssa(&a.mid)
+ want := Z65{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [65]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero65 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z1023 struct {
+ pre [8]byte
+ mid [1023]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero1023_ssa(x *[1023]byte) {
+ *x = [1023]byte{}
+}
+func testZero1023(t *testing.T) {
+ a := Z1023{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1023]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero1023_ssa(&a.mid)
+ want := Z1023{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1023]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero1023 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z1024 struct {
+ pre [8]byte
+ mid [1024]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero1024_ssa(x *[1024]byte) {
+ *x = [1024]byte{}
+}
+func testZero1024(t *testing.T) {
+ a := Z1024{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1024]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero1024_ssa(&a.mid)
+ want := Z1024{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1024]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero1024 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z1025 struct {
+ pre [8]byte
+ mid [1025]byte
+ post [8]byte
+}
+
+//go:noinline
+func zero1025_ssa(x *[1025]byte) {
+ *x = [1025]byte{}
+}
+func testZero1025(t *testing.T) {
+ a := Z1025{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1025]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero1025_ssa(&a.mid)
+ want := Z1025{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1025]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ if a != want {
+ t.Errorf("zero1025 got=%v, want %v\n", a, want)
+ }
+}
+
+type Z8u1 struct {
+ b bool
+ val [8]byte
+}
+type Z8u2 struct {
+ i uint16
+ val [8]byte
+}
+
+//go:noinline
+func zero8u1_ssa(t *Z8u1) {
+ t.val = [8]byte{}
+}
+
+//go:noinline
+func zero8u2_ssa(t *Z8u2) {
+ t.val = [8]byte{}
+}
+func testZero8u(t *testing.T) {
+ a := Z8u1{false, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero8u1_ssa(&a)
+ want := Z8u1{false, [8]byte{0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero8u2 got=%v, want %v\n", a, want)
+ }
+ b := Z8u2{15, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
+ zero8u2_ssa(&b)
+ wantb := Z8u2{15, [8]byte{0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero8u2 got=%v, want %v\n", b, wantb)
+ }
+}
+
+type Z16u1 struct {
+ b bool
+ val [16]byte
+}
+type Z16u2 struct {
+ i uint16
+ val [16]byte
+}
+
+//go:noinline
+func zero16u1_ssa(t *Z16u1) {
+ t.val = [16]byte{}
+}
+
+//go:noinline
+func zero16u2_ssa(t *Z16u2) {
+ t.val = [16]byte{}
+}
+func testZero16u(t *testing.T) {
+ a := Z16u1{false, [16]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero16u1_ssa(&a)
+ want := Z16u1{false, [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero16u2 got=%v, want %v\n", a, want)
+ }
+ b := Z16u2{15, [16]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero16u2_ssa(&b)
+ wantb := Z16u2{15, [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero16u2 got=%v, want %v\n", b, wantb)
+ }
+}
+
+type Z24u1 struct {
+ b bool
+ val [24]byte
+}
+type Z24u2 struct {
+ i uint16
+ val [24]byte
+}
+
+//go:noinline
+func zero24u1_ssa(t *Z24u1) {
+ t.val = [24]byte{}
+}
+
+//go:noinline
+func zero24u2_ssa(t *Z24u2) {
+ t.val = [24]byte{}
+}
+func testZero24u(t *testing.T) {
+ a := Z24u1{false, [24]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero24u1_ssa(&a)
+ want := Z24u1{false, [24]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero24u2 got=%v, want %v\n", a, want)
+ }
+ b := Z24u2{15, [24]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero24u2_ssa(&b)
+ wantb := Z24u2{15, [24]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero24u2 got=%v, want %v\n", b, wantb)
+ }
+}
+
+type Z32u1 struct {
+ b bool
+ val [32]byte
+}
+type Z32u2 struct {
+ i uint16
+ val [32]byte
+}
+
+//go:noinline
+func zero32u1_ssa(t *Z32u1) {
+ t.val = [32]byte{}
+}
+
+//go:noinline
+func zero32u2_ssa(t *Z32u2) {
+ t.val = [32]byte{}
+}
+func testZero32u(t *testing.T) {
+ a := Z32u1{false, [32]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero32u1_ssa(&a)
+ want := Z32u1{false, [32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero32u2 got=%v, want %v\n", a, want)
+ }
+ b := Z32u2{15, [32]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero32u2_ssa(&b)
+ wantb := Z32u2{15, [32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero32u2 got=%v, want %v\n", b, wantb)
+ }
+}
+
+type Z64u1 struct {
+ b bool
+ val [64]byte
+}
+type Z64u2 struct {
+ i uint16
+ val [64]byte
+}
+
+//go:noinline
+func zero64u1_ssa(t *Z64u1) {
+ t.val = [64]byte{}
+}
+
+//go:noinline
+func zero64u2_ssa(t *Z64u2) {
+ t.val = [64]byte{}
+}
+func testZero64u(t *testing.T) {
+ a := Z64u1{false, [64]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero64u1_ssa(&a)
+ want := Z64u1{false, [64]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero64u2 got=%v, want %v\n", a, want)
+ }
+ b := Z64u2{15, [64]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero64u2_ssa(&b)
+ wantb := Z64u2{15, [64]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero64u2 got=%v, want %v\n", b, wantb)
+ }
+}
+
+type Z256u1 struct {
+ b bool
+ val [256]byte
+}
+type Z256u2 struct {
+ i uint16
+ val [256]byte
+}
+
+//go:noinline
+func zero256u1_ssa(t *Z256u1) {
+ t.val = [256]byte{}
+}
+
+//go:noinline
+func zero256u2_ssa(t *Z256u2) {
+ t.val = [256]byte{}
+}
+func testZero256u(t *testing.T) {
+ a := Z256u1{false, [256]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero256u1_ssa(&a)
+ want := Z256u1{false, [256]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if a != want {
+ t.Errorf("zero256u2 got=%v, want %v\n", a, want)
+ }
+ b := Z256u2{15, [256]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}}
+ zero256u2_ssa(&b)
+ wantb := Z256u2{15, [256]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
+ if b != wantb {
+ t.Errorf("zero256u2 got=%v, want %v\n", b, wantb)
+ }
+}
+func TestZero(t *testing.T) {
+ testZero1(t)
+ testZero2(t)
+ testZero3(t)
+ testZero4(t)
+ testZero5(t)
+ testZero6(t)
+ testZero7(t)
+ testZero8(t)
+ testZero9(t)
+ testZero10(t)
+ testZero15(t)
+ testZero16(t)
+ testZero17(t)
+ testZero23(t)
+ testZero24(t)
+ testZero25(t)
+ testZero31(t)
+ testZero32(t)
+ testZero33(t)
+ testZero63(t)
+ testZero64(t)
+ testZero65(t)
+ testZero1023(t)
+ testZero1024(t)
+ testZero1025(t)
+ testZero8u(t)
+ testZero16u(t)
+ testZero24u(t)
+ testZero32u(t)
+ testZero64u(t)
+ testZero256u(t)
+}
diff --git a/src/cmd/compile/internal/test/truncconst_test.go b/src/cmd/compile/internal/test/truncconst_test.go
new file mode 100644
index 0000000..7705042
--- /dev/null
+++ b/src/cmd/compile/internal/test/truncconst_test.go
@@ -0,0 +1,63 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import "testing"
+
+var f52want float64 = 1.0 / (1 << 52)
+var f53want float64 = 1.0 / (1 << 53)
+
+func TestTruncFlt(t *testing.T) {
+ const f52 = 1 + 1.0/(1<<52)
+ const f53 = 1 + 1.0/(1<<53)
+
+ if got := f52 - 1; got != f52want {
+ t.Errorf("f52-1 = %g, want %g", got, f52want)
+ }
+ if got := float64(f52) - 1; got != f52want {
+ t.Errorf("float64(f52)-1 = %g, want %g", got, f52want)
+ }
+ if got := f53 - 1; got != f53want {
+ t.Errorf("f53-1 = %g, want %g", got, f53want)
+ }
+ if got := float64(f53) - 1; got != 0 {
+ t.Errorf("float64(f53)-1 = %g, want 0", got)
+ }
+}
+
+func TestTruncCmplx(t *testing.T) {
+ const r52 = complex(1+1.0/(1<<52), 0)
+ const r53 = complex(1+1.0/(1<<53), 0)
+
+ if got := real(r52 - 1); got != f52want {
+ t.Errorf("real(r52-1) = %g, want %g", got, f52want)
+ }
+ if got := real(complex128(r52) - 1); got != f52want {
+ t.Errorf("real(complex128(r52)-1) = %g, want %g", got, f52want)
+ }
+ if got := real(r53 - 1); got != f53want {
+ t.Errorf("real(r53-1) = %g, want %g", got, f53want)
+ }
+ if got := real(complex128(r53) - 1); got != 0 {
+ t.Errorf("real(complex128(r53)-1) = %g, want 0", got)
+ }
+
+ const i52 = complex(0, 1+1.0/(1<<52))
+ const i53 = complex(0, 1+1.0/(1<<53))
+
+ if got := imag(i52 - 1i); got != f52want {
+ t.Errorf("imag(i52-1i) = %g, want %g", got, f52want)
+ }
+ if got := imag(complex128(i52) - 1i); got != f52want {
+ t.Errorf("imag(complex128(i52)-1i) = %g, want %g", got, f52want)
+ }
+ if got := imag(i53 - 1i); got != f53want {
+ t.Errorf("imag(i53-1i) = %g, want %g", got, f53want)
+ }
+ if got := imag(complex128(i53) - 1i); got != 0 {
+ t.Errorf("imag(complex128(i53)-1i) = %g, want 0", got)
+ }
+
+}
diff --git a/src/cmd/compile/internal/test/zerorange_test.go b/src/cmd/compile/internal/test/zerorange_test.go
new file mode 100644
index 0000000..e92b5d3
--- /dev/null
+++ b/src/cmd/compile/internal/test/zerorange_test.go
@@ -0,0 +1,184 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "testing"
+)
+
+var glob = 3
+var globp *int64
+
+// Testing compilation of arch.ZeroRange of various sizes.
+
+// By storing a pointer to an int64 output param in a global, the compiler must
+// ensure that output param is allocated on the heap. Also, since there is a
+// defer, the pointer to each output param must be zeroed in the prologue (see
+// plive.go:epilogue()). So, we will get a block of one or more stack slots that
+// need to be zeroed. Hence, we are testing compilation completes successfully when
+// zerorange calls of various sizes (8-136 bytes) are generated. We are not
+// testing runtime correctness (which is hard to do for the current uses of
+// ZeroRange).
+
+func TestZeroRange(t *testing.T) {
+ testZeroRange8(t)
+ testZeroRange16(t)
+ testZeroRange32(t)
+ testZeroRange64(t)
+ testZeroRange136(t)
+}
+
+func testZeroRange8(t *testing.T) (r int64) {
+ defer func() {
+ glob = 4
+ }()
+ globp = &r
+ return
+}
+
+func testZeroRange16(t *testing.T) (r, s int64) {
+ defer func() {
+ glob = 4
+ }()
+ globp = &r
+ globp = &s
+ return
+}
+
+func testZeroRange32(t *testing.T) (r, s, t2, u int64) {
+ defer func() {
+ glob = 4
+ }()
+ globp = &r
+ globp = &s
+ globp = &t2
+ globp = &u
+ return
+}
+
+func testZeroRange64(t *testing.T) (r, s, t2, u, v, w, x, y int64) {
+ defer func() {
+ glob = 4
+ }()
+ globp = &r
+ globp = &s
+ globp = &t2
+ globp = &u
+ globp = &v
+ globp = &w
+ globp = &x
+ globp = &y
+ return
+}
+
+func testZeroRange136(t *testing.T) (r, s, t2, u, v, w, x, y, r1, s1, t1, u1, v1, w1, x1, y1, z1 int64) {
+ defer func() {
+ glob = 4
+ }()
+ globp = &r
+ globp = &s
+ globp = &t2
+ globp = &u
+ globp = &v
+ globp = &w
+ globp = &x
+ globp = &y
+ globp = &r1
+ globp = &s1
+ globp = &t1
+ globp = &u1
+ globp = &v1
+ globp = &w1
+ globp = &x1
+ globp = &y1
+ globp = &z1
+ return
+}
+
+type S struct {
+ x [2]uint64
+ p *uint64
+ y [2]uint64
+ q uint64
+}
+
+type M struct {
+ x [8]uint64
+ p *uint64
+ y [8]uint64
+ q uint64
+}
+
+type L struct {
+ x [4096]uint64
+ p *uint64
+ y [4096]uint64
+ q uint64
+}
+
+//go:noinline
+func triggerZerorangeLarge(f, g, h uint64) (rv0 uint64) {
+ ll := L{p: &f}
+ da := f
+ rv0 = f + g + h
+ defer func(dl L, i uint64) {
+ rv0 += dl.q + i
+ }(ll, da)
+ return rv0
+}
+
+//go:noinline
+func triggerZerorangeMedium(f, g, h uint64) (rv0 uint64) {
+ ll := M{p: &f}
+ rv0 = f + g + h
+ defer func(dm M, i uint64) {
+ rv0 += dm.q + i
+ }(ll, f)
+ return rv0
+}
+
+//go:noinline
+func triggerZerorangeSmall(f, g, h uint64) (rv0 uint64) {
+ ll := S{p: &f}
+ rv0 = f + g + h
+ defer func(ds S, i uint64) {
+ rv0 += ds.q + i
+ }(ll, f)
+ return rv0
+}
+
+// This test was created as a follow up to issue #45372, to help
+// improve coverage of the compiler's arch-specific "zerorange"
+// function, which is invoked to zero out ambiguously live portions of
+// the stack frame in certain specific circumstances.
+//
+// In the current compiler implementation, for zerorange to be
+// invoked, we need to have an ambiguously live variable that needs
+// zeroing. One way to trigger this is to have a function with an
+// open-coded defer, where the opendefer function has an argument that
+// contains a pointer (this is what's used below).
+//
+// At the moment this test doesn't do any specific checking for
+// code sequence, or verification that things were properly set to zero,
+// this seems as though it would be too tricky and would result
+// in a "brittle" test.
+//
+// The small/medium/large scenarios below are inspired by the amd64
+// implementation of zerorange, which generates different code
+// depending on the size of the thing that needs to be zeroed out
+// (I've verified at the time of the writing of this test that it
+// exercises the various cases).
+func TestZerorange45372(t *testing.T) {
+ if r := triggerZerorangeLarge(101, 303, 505); r != 1010 {
+ t.Errorf("large: wanted %d got %d", 1010, r)
+ }
+ if r := triggerZerorangeMedium(101, 303, 505); r != 1010 {
+ t.Errorf("medium: wanted %d got %d", 1010, r)
+ }
+ if r := triggerZerorangeSmall(101, 303, 505); r != 1010 {
+ t.Errorf("small: wanted %d got %d", 1010, r)
+ }
+
+}