diff options
| author | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-03-01 21:36:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-03-01 21:36:45 +0000 |
| commit | a6fb2aede7c8d47b4d913eb83fa45bbeca76c433 (patch) | |
| tree | 1dd5039e5515959a8d162fbdac964663dd2ec778 /src/cmd/compile/internal/gc/testdata | |
| parent | 998aaf8a64b7d90269815a2ae9d778da519d0a87 (diff) | |
| parent | 9d854fd44ae669f60c15133a4d2ce407ea2bccc4 (diff) | |
| download | go-a6fb2aede7c8d47b4d913eb83fa45bbeca76c433.tar.xz | |
Merge "Merge branch 'dev.ssa' into mergebranch"
Diffstat (limited to 'src/cmd/compile/internal/gc/testdata')
28 files changed, 19566 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/testdata/addressed_ssa.go b/src/cmd/compile/internal/gc/testdata/addressed_ssa.go new file mode 100644 index 0000000000..f9f459360b --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/addressed_ssa.go @@ -0,0 +1,216 @@ +// 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" + +var output string + +func mypanic(s string) { + fmt.Printf(output) + panic(s) +} + +func assertEqual(x, y int) { + if x != y { + mypanic("assertEqual failed") + } +} + +func main() { + 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(*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(*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(*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(*z.(*int), 8) + + args() + test_autos() +} + +func f1_ssa(x, y int) *int { + switch { + } //go:noinline + x = x*y + y + return &x +} + +func f3a_ssa(x int) *int { + switch { + } //go:noinline + return &x +} + +func f3b_ssa(x int) interface{} { // ./foo.go:15: internal error: f3b_ssa ~r1 (type interface {}) recorded as live on entry + switch { + } //go:noinline + return &x +} + +func f3c_ssa(y int) interface{} { + switch { + } //go:noinline + x := y + return &x +} + +type V struct { + p *V + w, x int64 +} + +func args() { + 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(int(i), 2) +} + +func (v V) args_ssa(a, b V) int64 { + switch { + } //go:noinline + 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() { + test(11) + test(12) + test(13) + test(21) + test(22) + test(23) + test(31) + test(32) +} + +func test(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("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("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("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. +func (v V) autos_ssa(which, w1, x1, w2, x2 int64) (y, z V) { + switch { + } //go:noinline + 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. +func (to *V) gets(from *V) { + switch { + } //go:noinline + *to = *from +} + +// gets is an address-and-interface-mentioning way of +// implementing structure assignment. +func (to *V) getsI(from interface{}) { + switch { + } //go:noinline + *to = *from.(*V) +} + +// fill_ssa initializes r with V{w:w, x:x, p:p} +func fill_ssa(w, x int64, r, p *V) { + switch { + } //go:noinline + *r = V{w: w, x: x, p: p} +} diff --git a/src/cmd/compile/internal/gc/testdata/append_ssa.go b/src/cmd/compile/internal/gc/testdata/append_ssa.go new file mode 100644 index 0000000000..03cd219c32 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/append_ssa.go @@ -0,0 +1,70 @@ +// 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 "fmt" + +var failed = false + +//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 eq(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(got, want []int) { + if eq(got, want) { + return + } + fmt.Printf("expected %v, got %v\n", want, got) + failed = true +} + +func testAppend() { + var store [7]int + a := store[:0] + + a = appendOne_ssa(a, 1) + expect(a, []int{1}) + a = appendThree_ssa(a, 2, 3, 4) + expect(a, []int{1, 2, 3, 4}) + a = appendThree_ssa(a, 5, 6, 7) + expect(a, []int{1, 2, 3, 4, 5, 6, 7}) + if &a[0] != &store[0] { + fmt.Println("unnecessary grow") + failed = true + } + a = appendOne_ssa(a, 8) + expect(a, []int{1, 2, 3, 4, 5, 6, 7, 8}) + if &a[0] == &store[0] { + fmt.Println("didn't grow") + failed = true + } +} + +func main() { + testAppend() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/arithBoundary_ssa.go b/src/cmd/compile/internal/gc/testdata/arithBoundary_ssa.go new file mode 100644 index 0000000000..929e4e1f0b --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/arithBoundary_ssa.go @@ -0,0 +1,735 @@ +package main + +import "fmt" + +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}, +} +var failed bool + +func main() { + + for _, v := range uint64_data { + if got := add_uint64_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_uint64 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_uint64_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_uint64 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_uint64_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_uint64 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_uint64_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_uint64 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_uint64_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_uint64 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range int64_data { + if got := add_int64_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_int64 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_int64_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_int64 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_int64_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_int64 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_int64_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_int64 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_int64_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_int64 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range uint32_data { + if got := add_uint32_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_uint32 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_uint32_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_uint32 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_uint32_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_uint32 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_uint32_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_uint32 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_uint32_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_uint32 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range int32_data { + if got := add_int32_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_int32 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_int32_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_int32 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_int32_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_int32 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_int32_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_int32 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_int32_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_int32 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range uint16_data { + if got := add_uint16_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_uint16 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_uint16_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_uint16 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_uint16_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_uint16 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_uint16_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_uint16 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_uint16_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_uint16 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range int16_data { + if got := add_int16_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_int16 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_int16_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_int16 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_int16_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_int16 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_int16_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_int16 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_int16_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_int16 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range uint8_data { + if got := add_uint8_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_uint8 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_uint8_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_uint8 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_uint8_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_uint8 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_uint8_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_uint8 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_uint8_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_uint8 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + for _, v := range int8_data { + if got := add_int8_ssa(v.a, v.b); got != v.add { + fmt.Printf("add_int8 %d+%d = %d, wanted %d\n", v.a, v.b, got, v.add) + failed = true + } + if got := sub_int8_ssa(v.a, v.b); got != v.sub { + fmt.Printf("sub_int8 %d-%d = %d, wanted %d\n", v.a, v.b, got, v.sub) + failed = true + } + if v.b != 0 { + if got := div_int8_ssa(v.a, v.b); got != v.div { + fmt.Printf("div_int8 %d/%d = %d, wanted %d\n", v.a, v.b, got, v.div) + failed = true + } + + } + if v.b != 0 { + if got := mod_int8_ssa(v.a, v.b); got != v.mod { + fmt.Printf("mod_int8 %d%%%d = %d, wanted %d\n", v.a, v.b, got, v.mod) + failed = true + } + + } + if got := mul_int8_ssa(v.a, v.b); got != v.mul { + fmt.Printf("mul_int8 %d*%d = %d, wanted %d\n", v.a, v.b, got, v.mul) + failed = true + } + } + if failed { + panic("tests failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/arithConst_ssa.go b/src/cmd/compile/internal/gc/testdata/arithConst_ssa.go new file mode 100644 index 0000000000..782d2df8c8 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/arithConst_ssa.go @@ -0,0 +1,12671 @@ +package main + +import "fmt" + +//go:noinline +func add_uint64_0_ssa(a uint64) uint64 { + return a + 0 +} + +//go:noinline +func add_0_uint64_ssa(a uint64) uint64 { + return 0 + a +} + +//go:noinline +func add_uint64_1_ssa(a uint64) uint64 { + return a + 1 +} + +//go:noinline +func add_1_uint64_ssa(a uint64) uint64 { + return 1 + a +} + +//go:noinline +func add_uint64_4294967296_ssa(a uint64) uint64 { + return a + 4294967296 +} + +//go:noinline +func add_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 + a +} + +//go:noinline +func add_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a + 18446744073709551615 +} + +//go:noinline +func add_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 + a +} + +//go:noinline +func sub_uint64_0_ssa(a uint64) uint64 { + return a - 0 +} + +//go:noinline +func sub_0_uint64_ssa(a uint64) uint64 { + return 0 - a +} + +//go:noinline +func sub_uint64_1_ssa(a uint64) uint64 { + return a - 1 +} + +//go:noinline +func sub_1_uint64_ssa(a uint64) uint64 { + return 1 - a +} + +//go:noinline +func sub_uint64_4294967296_ssa(a uint64) uint64 { + return a - 4294967296 +} + +//go:noinline +func sub_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 - a +} + +//go:noinline +func sub_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a - 18446744073709551615 +} + +//go:noinline +func sub_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 - a +} + +//go:noinline +func div_0_uint64_ssa(a uint64) uint64 { + return 0 / a +} + +//go:noinline +func div_uint64_1_ssa(a uint64) uint64 { + return a / 1 +} + +//go:noinline +func div_1_uint64_ssa(a uint64) uint64 { + return 1 / a +} + +//go:noinline +func div_uint64_4294967296_ssa(a uint64) uint64 { + return a / 4294967296 +} + +//go:noinline +func div_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 / a +} + +//go:noinline +func div_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a / 18446744073709551615 +} + +//go:noinline +func div_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 / a +} + +//go:noinline +func mul_uint64_0_ssa(a uint64) uint64 { + return a * 0 +} + +//go:noinline +func mul_0_uint64_ssa(a uint64) uint64 { + return 0 * a +} + +//go:noinline +func mul_uint64_1_ssa(a uint64) uint64 { + return a * 1 +} + +//go:noinline +func mul_1_uint64_ssa(a uint64) uint64 { + return 1 * a +} + +//go:noinline +func mul_uint64_4294967296_ssa(a uint64) uint64 { + return a * 4294967296 +} + +//go:noinline +func mul_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 * a +} + +//go:noinline +func mul_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a * 18446744073709551615 +} + +//go:noinline +func mul_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 * a +} + +//go:noinline +func lsh_uint64_0_ssa(a uint64) uint64 { + return a << 0 +} + +//go:noinline +func lsh_0_uint64_ssa(a uint64) uint64 { + return 0 << a +} + +//go:noinline +func lsh_uint64_1_ssa(a uint64) uint64 { + return a << 1 +} + +//go:noinline +func lsh_1_uint64_ssa(a uint64) uint64 { + return 1 << a +} + +//go:noinline +func lsh_uint64_4294967296_ssa(a uint64) uint64 { + return a << 4294967296 +} + +//go:noinline +func lsh_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 << a +} + +//go:noinline +func lsh_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a << 18446744073709551615 +} + +//go:noinline +func lsh_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 << a +} + +//go:noinline +func rsh_uint64_0_ssa(a uint64) uint64 { + return a >> 0 +} + +//go:noinline +func rsh_0_uint64_ssa(a uint64) uint64 { + return 0 >> a +} + +//go:noinline +func rsh_uint64_1_ssa(a uint64) uint64 { + return a >> 1 +} + +//go:noinline +func rsh_1_uint64_ssa(a uint64) uint64 { + return 1 >> a +} + +//go:noinline +func rsh_uint64_4294967296_ssa(a uint64) uint64 { + return a >> 4294967296 +} + +//go:noinline +func rsh_4294967296_uint64_ssa(a uint64) uint64 { + return 4294967296 >> a +} + +//go:noinline +func rsh_uint64_18446744073709551615_ssa(a uint64) uint64 { + return a >> 18446744073709551615 +} + +//go:noinline +func rsh_18446744073709551615_uint64_ssa(a uint64) uint64 { + return 18446744073709551615 >> a +} + +//go:noinline +func add_int64_Neg9223372036854775808_ssa(a int64) int64 { + return a + -9223372036854775808 +} + +//go:noinline +func add_Neg9223372036854775808_int64_ssa(a int64) int64 { + return -9223372036854775808 + a +} + +//go:noinline +func add_int64_Neg9223372036854775807_ssa(a int64) int64 { + return a + -9223372036854775807 +} + +//go:noinline +func add_Neg9223372036854775807_int64_ssa(a int64) int64 { + return -9223372036854775807 + a +} + +//go:noinline +func add_int64_Neg4294967296_ssa(a int64) int64 { + return a + -4294967296 +} + +//go:noinline +func add_Neg4294967296_int64_ssa(a int64) int64 { + return -4294967296 + a +} + +//go:noinline +func add_int64_Neg1_ssa(a int64) int64 { + return a + -1 +} + +//go:noinline +func add_Neg1_int64_ssa(a int64) int64 { + return -1 + a +} + +//go:noinline +func add_int64_0_ssa(a int64) int64 { + return a + 0 +} + +//go:noinline +func add_0_int64_ssa(a int64) int64 { + return 0 + a +} + +//go:noinline +func add_int64_1_ssa(a int64) int64 { + return a + 1 +} + +//go:noinline +func add_1_int64_ssa(a int64) int64 { + return 1 + a +} + +//go:noinline +func add_int64_4294967296_ssa(a int64) int64 { + return a + 4294967296 +} + +//go:noinline +func add_4294967296_int64_ssa(a int64) int64 { + return 4294967296 + a +} + +//go:noinline +func add_int64_9223372036854775806_ssa(a int64) int64 { + return a + 9223372036854775806 +} + +//go:noinline +func add_9223372036854775806_int64_ssa(a int64) int64 { + return 9223372036854775806 + a +} + +//go:noinline +func add_int64_9223372036854775807_ssa(a int64) int64 { + return a + 9223372036854775807 +} + +//go:noinline +func add_9223372036854775807_int64_ssa(a int64) int64 { + return 9223372036854775807 + a +} + +//go:noinline +func sub_int64_Neg9223372036854775808_ssa(a int64) int64 { + return a - -9223372036854775808 +} + +//go:noinline +func sub_Neg9223372036854775808_int64_ssa(a int64) int64 { + return -9223372036854775808 - a +} + +//go:noinline +func sub_int64_Neg9223372036854775807_ssa(a int64) int64 { + return a - -9223372036854775807 +} + +//go:noinline +func sub_Neg9223372036854775807_int64_ssa(a int64) int64 { + return -9223372036854775807 - a +} + +//go:noinline +func sub_int64_Neg4294967296_ssa(a int64) int64 { + return a - -4294967296 +} + +//go:noinline +func sub_Neg4294967296_int64_ssa(a int64) int64 { + return -4294967296 - a +} + +//go:noinline +func sub_int64_Neg1_ssa(a int64) int64 { + return a - -1 +} + +//go:noinline +func sub_Neg1_int64_ssa(a int64) int64 { + return -1 - a +} + +//go:noinline +func sub_int64_0_ssa(a int64) int64 { + return a - 0 +} + +//go:noinline +func sub_0_int64_ssa(a int64) int64 { + return 0 - a +} + +//go:noinline +func sub_int64_1_ssa(a int64) int64 { + return a - 1 +} + +//go:noinline +func sub_1_int64_ssa(a int64) int64 { + return 1 - a +} + +//go:noinline +func sub_int64_4294967296_ssa(a int64) int64 { + return a - 4294967296 +} + +//go:noinline +func sub_4294967296_int64_ssa(a int64) int64 { + return 4294967296 - a +} + +//go:noinline +func sub_int64_9223372036854775806_ssa(a int64) int64 { + return a - 9223372036854775806 +} + +//go:noinline +func sub_9223372036854775806_int64_ssa(a int64) int64 { + return 9223372036854775806 - a +} + +//go:noinline +func sub_int64_9223372036854775807_ssa(a int64) int64 { + return a - 9223372036854775807 +} + +//go:noinline +func sub_9223372036854775807_int64_ssa(a int64) int64 { + return 9223372036854775807 - a +} + +//go:noinline +func div_int64_Neg9223372036854775808_ssa(a int64) int64 { + return a / -9223372036854775808 +} + +//go:noinline +func div_Neg9223372036854775808_int64_ssa(a int64) int64 { + return -9223372036854775808 / a +} + +//go:noinline +func div_int64_Neg9223372036854775807_ssa(a int64) int64 { + return a / -9223372036854775807 +} + +//go:noinline +func div_Neg9223372036854775807_int64_ssa(a int64) int64 { + return -9223372036854775807 / a +} + +//go:noinline +func div_int64_Neg4294967296_ssa(a int64) int64 { + return a / -4294967296 +} + +//go:noinline +func div_Neg4294967296_int64_ssa(a int64) int64 { + return -4294967296 / a +} + +//go:noinline +func div_int64_Neg1_ssa(a int64) int64 { + return a / -1 +} + +//go:noinline +func div_Neg1_int64_ssa(a int64) int64 { + return -1 / a +} + +//go:noinline +func div_0_int64_ssa(a int64) int64 { + return 0 / a +} + +//go:noinline +func div_int64_1_ssa(a int64) int64 { + return a / 1 +} + +//go:noinline +func div_1_int64_ssa(a int64) int64 { + return 1 / a +} + +//go:noinline +func div_int64_4294967296_ssa(a int64) int64 { + return a / 4294967296 +} + +//go:noinline +func div_4294967296_int64_ssa(a int64) int64 { + return 4294967296 / a +} + +//go:noinline +func div_int64_9223372036854775806_ssa(a int64) int64 { + return a / 9223372036854775806 +} + +//go:noinline +func div_9223372036854775806_int64_ssa(a int64) int64 { + return 9223372036854775806 / a +} + +//go:noinline +func div_int64_9223372036854775807_ssa(a int64) int64 { + return a / 9223372036854775807 +} + +//go:noinline +func div_9223372036854775807_int64_ssa(a int64) int64 { + return 9223372036854775807 / a +} + +//go:noinline +func mul_int64_Neg9223372036854775808_ssa(a int64) int64 { + return a * -9223372036854775808 +} + +//go:noinline +func mul_Neg9223372036854775808_int64_ssa(a int64) int64 { + return -9223372036854775808 * a +} + +//go:noinline +func mul_int64_Neg9223372036854775807_ssa(a int64) int64 { + return a * -9223372036854775807 +} + +//go:noinline +func mul_Neg9223372036854775807_int64_ssa(a int64) int64 { + return -9223372036854775807 * a +} + +//go:noinline +func mul_int64_Neg4294967296_ssa(a int64) int64 { + return a * -4294967296 +} + +//go:noinline +func mul_Neg4294967296_int64_ssa(a int64) int64 { + return -4294967296 * a +} + +//go:noinline +func mul_int64_Neg1_ssa(a int64) int64 { + return a * -1 +} + +//go:noinline +func mul_Neg1_int64_ssa(a int64) int64 { + return -1 * a +} + +//go:noinline +func mul_int64_0_ssa(a int64) int64 { + return a * 0 +} + +//go:noinline +func mul_0_int64_ssa(a int64) int64 { + return 0 * a +} + +//go:noinline +func mul_int64_1_ssa(a int64) int64 { + return a * 1 +} + +//go:noinline +func mul_1_int64_ssa(a int64) int64 { + return 1 * a +} + +//go:noinline +func mul_int64_4294967296_ssa(a int64) int64 { + return a * 4294967296 +} + +//go:noinline +func mul_4294967296_int64_ssa(a int64) int64 { + return 4294967296 * a +} + +//go:noinline +func mul_int64_9223372036854775806_ssa(a int64) int64 { + return a * 9223372036854775806 +} + +//go:noinline +func mul_9223372036854775806_int64_ssa(a int64) int64 { + return 9223372036854775806 * a +} + +//go:noinline +func mul_int64_9223372036854775807_ssa(a int64) int64 { + return a * 9223372036854775807 +} + +//go:noinline +func mul_9223372036854775807_int64_ssa(a int64) int64 { + return 9223372036854775807 * a +} + +//go:noinline +func add_uint32_0_ssa(a uint32) uint32 { + return a + 0 +} + +//go:noinline +func add_0_uint32_ssa(a uint32) uint32 { + return 0 + a +} + +//go:noinline +func add_uint32_1_ssa(a uint32) uint32 { + return a + 1 +} + +//go:noinline +func add_1_uint32_ssa(a uint32) uint32 { + return 1 + a +} + +//go:noinline +func add_uint32_4294967295_ssa(a uint32) uint32 { + return a + 4294967295 +} + +//go:noinline +func add_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 + a +} + +//go:noinline +func sub_uint32_0_ssa(a uint32) uint32 { + return a - 0 +} + +//go:noinline +func sub_0_uint32_ssa(a uint32) uint32 { + return 0 - a +} + +//go:noinline +func sub_uint32_1_ssa(a uint32) uint32 { + return a - 1 +} + +//go:noinline +func sub_1_uint32_ssa(a uint32) uint32 { + return 1 - a +} + +//go:noinline +func sub_uint32_4294967295_ssa(a uint32) uint32 { + return a - 4294967295 +} + +//go:noinline +func sub_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 - a +} + +//go:noinline +func div_0_uint32_ssa(a uint32) uint32 { + return 0 / a +} + +//go:noinline +func div_uint32_1_ssa(a uint32) uint32 { + return a / 1 +} + +//go:noinline +func div_1_uint32_ssa(a uint32) uint32 { + return 1 / a +} + +//go:noinline +func div_uint32_4294967295_ssa(a uint32) uint32 { + return a / 4294967295 +} + +//go:noinline +func div_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 / a +} + +//go:noinline +func mul_uint32_0_ssa(a uint32) uint32 { + return a * 0 +} + +//go:noinline +func mul_0_uint32_ssa(a uint32) uint32 { + return 0 * a +} + +//go:noinline +func mul_uint32_1_ssa(a uint32) uint32 { + return a * 1 +} + +//go:noinline +func mul_1_uint32_ssa(a uint32) uint32 { + return 1 * a +} + +//go:noinline +func mul_uint32_4294967295_ssa(a uint32) uint32 { + return a * 4294967295 +} + +//go:noinline +func mul_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 * a +} + +//go:noinline +func lsh_uint32_0_ssa(a uint32) uint32 { + return a << 0 +} + +//go:noinline +func lsh_0_uint32_ssa(a uint32) uint32 { + return 0 << a +} + +//go:noinline +func lsh_uint32_1_ssa(a uint32) uint32 { + return a << 1 +} + +//go:noinline +func lsh_1_uint32_ssa(a uint32) uint32 { + return 1 << a +} + +//go:noinline +func lsh_uint32_4294967295_ssa(a uint32) uint32 { + return a << 4294967295 +} + +//go:noinline +func lsh_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 << a +} + +//go:noinline +func rsh_uint32_0_ssa(a uint32) uint32 { + return a >> 0 +} + +//go:noinline +func rsh_0_uint32_ssa(a uint32) uint32 { + return 0 >> a +} + +//go:noinline +func rsh_uint32_1_ssa(a uint32) uint32 { + return a >> 1 +} + +//go:noinline +func rsh_1_uint32_ssa(a uint32) uint32 { + return 1 >> a +} + +//go:noinline +func rsh_uint32_4294967295_ssa(a uint32) uint32 { + return a >> 4294967295 +} + +//go:noinline +func rsh_4294967295_uint32_ssa(a uint32) uint32 { + return 4294967295 >> a +} + +//go:noinline +func add_int32_Neg2147483648_ssa(a int32) int32 { + return a + -2147483648 +} + +//go:noinline +func add_Neg2147483648_int32_ssa(a int32) int32 { + return -2147483648 + a +} + +//go:noinline +func add_int32_Neg2147483647_ssa(a int32) int32 { + return a + -2147483647 +} + +//go:noinline +func add_Neg2147483647_int32_ssa(a int32) int32 { + return -2147483647 + a +} + +//go:noinline +func add_int32_Neg1_ssa(a int32) int32 { + return a + -1 +} + +//go:noinline +func add_Neg1_int32_ssa(a int32) int32 { + return -1 + a +} + +//go:noinline +func add_int32_0_ssa(a int32) int32 { + return a + 0 +} + +//go:noinline +func add_0_int32_ssa(a int32) int32 { + return 0 + a +} + +//go:noinline +func add_int32_1_ssa(a int32) int32 { + return a + 1 +} + +//go:noinline +func add_1_int32_ssa(a int32) int32 { + return 1 + a +} + +//go:noinline +func add_int32_2147483647_ssa(a int32) int32 { + return a + 2147483647 +} + +//go:noinline +func add_2147483647_int32_ssa(a int32) int32 { + return 2147483647 + a +} + +//go:noinline +func sub_int32_Neg2147483648_ssa(a int32) int32 { + return a - -2147483648 +} + +//go:noinline +func sub_Neg2147483648_int32_ssa(a int32) int32 { + return -2147483648 - a +} + +//go:noinline +func sub_int32_Neg2147483647_ssa(a int32) int32 { + return a - -2147483647 +} + +//go:noinline +func sub_Neg2147483647_int32_ssa(a int32) int32 { + return -2147483647 - a +} + +//go:noinline +func sub_int32_Neg1_ssa(a int32) int32 { + return a - -1 +} + +//go:noinline +func sub_Neg1_int32_ssa(a int32) int32 { + return -1 - a +} + +//go:noinline +func sub_int32_0_ssa(a int32) int32 { + return a - 0 +} + +//go:noinline +func sub_0_int32_ssa(a int32) int32 { + return 0 - a +} + +//go:noinline +func sub_int32_1_ssa(a int32) int32 { + return a - 1 +} + +//go:noinline +func sub_1_int32_ssa(a int32) int32 { + return 1 - a +} + +//go:noinline +func sub_int32_2147483647_ssa(a int32) int32 { + return a - 2147483647 +} + +//go:noinline +func sub_2147483647_int32_ssa(a int32) int32 { + return 2147483647 - a +} + +//go:noinline +func div_int32_Neg2147483648_ssa(a int32) int32 { + return a / -2147483648 +} + +//go:noinline +func div_Neg2147483648_int32_ssa(a int32) int32 { + return -2147483648 / a +} + +//go:noinline +func div_int32_Neg2147483647_ssa(a int32) int32 { + return a / -2147483647 +} + +//go:noinline +func div_Neg2147483647_int32_ssa(a int32) int32 { + return -2147483647 / a +} + +//go:noinline +func div_int32_Neg1_ssa(a int32) int32 { + return a / -1 +} + +//go:noinline +func div_Neg1_int32_ssa(a int32) int32 { + return -1 / a +} + +//go:noinline +func div_0_int32_ssa(a int32) int32 { + return 0 / a +} + +//go:noinline +func div_int32_1_ssa(a int32) int32 { + return a / 1 +} + +//go:noinline +func div_1_int32_ssa(a int32) int32 { + return 1 / a +} + +//go:noinline +func div_int32_2147483647_ssa(a int32) int32 { + return a / 2147483647 +} + +//go:noinline +func div_2147483647_int32_ssa(a int32) int32 { + return 2147483647 / a +} + +//go:noinline +func mul_int32_Neg2147483648_ssa(a int32) int32 { + return a * -2147483648 +} + +//go:noinline +func mul_Neg2147483648_int32_ssa(a int32) int32 { + return -2147483648 * a +} + +//go:noinline +func mul_int32_Neg2147483647_ssa(a int32) int32 { + return a * -2147483647 +} + +//go:noinline +func mul_Neg2147483647_int32_ssa(a int32) int32 { + return -2147483647 * a +} + +//go:noinline +func mul_int32_Neg1_ssa(a int32) int32 { + return a * -1 +} + +//go:noinline +func mul_Neg1_int32_ssa(a int32) int32 { + return -1 * a +} + +//go:noinline +func mul_int32_0_ssa(a int32) int32 { + return a * 0 +} + +//go:noinline +func mul_0_int32_ssa(a int32) int32 { + return 0 * a +} + +//go:noinline +func mul_int32_1_ssa(a int32) int32 { + return a * 1 +} + +//go:noinline +func mul_1_int32_ssa(a int32) int32 { + return 1 * a +} + +//go:noinline +func mul_int32_2147483647_ssa(a int32) int32 { + return a * 2147483647 +} + +//go:noinline +func mul_2147483647_int32_ssa(a int32) int32 { + return 2147483647 * a +} + +//go:noinline +func add_uint16_0_ssa(a uint16) uint16 { + return a + 0 +} + +//go:noinline +func add_0_uint16_ssa(a uint16) uint16 { + return 0 + a +} + +//go:noinline +func add_uint16_1_ssa(a uint16) uint16 { + return a + 1 +} + +//go:noinline +func add_1_uint16_ssa(a uint16) uint16 { + return 1 + a +} + +//go:noinline +func add_uint16_65535_ssa(a uint16) uint16 { + return a + 65535 +} + +//go:noinline +func add_65535_uint16_ssa(a uint16) uint16 { + return 65535 + a +} + +//go:noinline +func sub_uint16_0_ssa(a uint16) uint16 { + return a - 0 +} + +//go:noinline +func sub_0_uint16_ssa(a uint16) uint16 { + return 0 - a +} + +//go:noinline +func sub_uint16_1_ssa(a uint16) uint16 { + return a - 1 +} + +//go:noinline +func sub_1_uint16_ssa(a uint16) uint16 { + return 1 - a +} + +//go:noinline +func sub_uint16_65535_ssa(a uint16) uint16 { + return a - 65535 +} + +//go:noinline +func sub_65535_uint16_ssa(a uint16) uint16 { + return 65535 - a +} + +//go:noinline +func div_0_uint16_ssa(a uint16) uint16 { + return 0 / a +} + +//go:noinline +func div_uint16_1_ssa(a uint16) uint16 { + return a / 1 +} + +//go:noinline +func div_1_uint16_ssa(a uint16) uint16 { + return 1 / a +} + +//go:noinline +func div_uint16_65535_ssa(a uint16) uint16 { + return a / 65535 +} + +//go:noinline +func div_65535_uint16_ssa(a uint16) uint16 { + return 65535 / a +} + +//go:noinline +func mul_uint16_0_ssa(a uint16) uint16 { + return a * 0 +} + +//go:noinline +func mul_0_uint16_ssa(a uint16) uint16 { + return 0 * a +} + +//go:noinline +func mul_uint16_1_ssa(a uint16) uint16 { + return a * 1 +} + +//go:noinline +func mul_1_uint16_ssa(a uint16) uint16 { + return 1 * a +} + +//go:noinline +func mul_uint16_65535_ssa(a uint16) uint16 { + return a * 65535 +} + +//go:noinline +func mul_65535_uint16_ssa(a uint16) uint16 { + return 65535 * a +} + +//go:noinline +func lsh_uint16_0_ssa(a uint16) uint16 { + return a << 0 +} + +//go:noinline +func lsh_0_uint16_ssa(a uint16) uint16 { + return 0 << a +} + +//go:noinline +func lsh_uint16_1_ssa(a uint16) uint16 { + return a << 1 +} + +//go:noinline +func lsh_1_uint16_ssa(a uint16) uint16 { + return 1 << a +} + +//go:noinline +func lsh_uint16_65535_ssa(a uint16) uint16 { + return a << 65535 +} + +//go:noinline +func lsh_65535_uint16_ssa(a uint16) uint16 { + return 65535 << a +} + +//go:noinline +func rsh_uint16_0_ssa(a uint16) uint16 { + return a >> 0 +} + +//go:noinline +func rsh_0_uint16_ssa(a uint16) uint16 { + return 0 >> a +} + +//go:noinline +func rsh_uint16_1_ssa(a uint16) uint16 { + return a >> 1 +} + +//go:noinline +func rsh_1_uint16_ssa(a uint16) uint16 { + return 1 >> a +} + +//go:noinline +func rsh_uint16_65535_ssa(a uint16) uint16 { + return a >> 65535 +} + +//go:noinline +func rsh_65535_uint16_ssa(a uint16) uint16 { + return 65535 >> a +} + +//go:noinline +func add_int16_Neg32768_ssa(a int16) int16 { + return a + -32768 +} + +//go:noinline +func add_Neg32768_int16_ssa(a int16) int16 { + return -32768 + a +} + +//go:noinline +func add_int16_Neg32767_ssa(a int16) int16 { + return a + -32767 +} + +//go:noinline +func add_Neg32767_int16_ssa(a int16) int16 { + return -32767 + a +} + +//go:noinline +func add_int16_Neg1_ssa(a int16) int16 { + return a + -1 +} + +//go:noinline +func add_Neg1_int16_ssa(a int16) int16 { + return -1 + a +} + +//go:noinline +func add_int16_0_ssa(a int16) int16 { + return a + 0 +} + +//go:noinline +func add_0_int16_ssa(a int16) int16 { + return 0 + a +} + +//go:noinline +func add_int16_1_ssa(a int16) int16 { + return a + 1 +} + +//go:noinline +func add_1_int16_ssa(a int16) int16 { + return 1 + a +} + +//go:noinline +func add_int16_32766_ssa(a int16) int16 { + return a + 32766 +} + +//go:noinline +func add_32766_int16_ssa(a int16) int16 { + return 32766 + a +} + +//go:noinline +func add_int16_32767_ssa(a int16) int16 { + return a + 32767 +} + +//go:noinline +func add_32767_int16_ssa(a int16) int16 { + return 32767 + a +} + +//go:noinline +func sub_int16_Neg32768_ssa(a int16) int16 { + return a - -32768 +} + +//go:noinline +func sub_Neg32768_int16_ssa(a int16) int16 { + return -32768 - a +} + +//go:noinline +func sub_int16_Neg32767_ssa(a int16) int16 { + return a - -32767 +} + +//go:noinline +func sub_Neg32767_int16_ssa(a int16) int16 { + return -32767 - a +} + +//go:noinline +func sub_int16_Neg1_ssa(a int16) int16 { + return a - -1 +} + +//go:noinline +func sub_Neg1_int16_ssa(a int16) int16 { + return -1 - a +} + +//go:noinline +func sub_int16_0_ssa(a int16) int16 { + return a - 0 +} + +//go:noinline +func sub_0_int16_ssa(a int16) int16 { + return 0 - a +} + +//go:noinline +func sub_int16_1_ssa(a int16) int16 { + return a - 1 +} + +//go:noinline +func sub_1_int16_ssa(a int16) int16 { + return 1 - a +} + +//go:noinline +func sub_int16_32766_ssa(a int16) int16 { + return a - 32766 +} + +//go:noinline +func sub_32766_int16_ssa(a int16) int16 { + return 32766 - a +} + +//go:noinline +func sub_int16_32767_ssa(a int16) int16 { + return a - 32767 +} + +//go:noinline +func sub_32767_int16_ssa(a int16) int16 { + return 32767 - a +} + +//go:noinline +func div_int16_Neg32768_ssa(a int16) int16 { + return a / -32768 +} + +//go:noinline +func div_Neg32768_int16_ssa(a int16) int16 { + return -32768 / a +} + +//go:noinline +func div_int16_Neg32767_ssa(a int16) int16 { + return a / -32767 +} + +//go:noinline +func div_Neg32767_int16_ssa(a int16) int16 { + return -32767 / a +} + +//go:noinline +func div_int16_Neg1_ssa(a int16) int16 { + return a / -1 +} + +//go:noinline +func div_Neg1_int16_ssa(a int16) int16 { + return -1 / a +} + +//go:noinline +func div_0_int16_ssa(a int16) int16 { + return 0 / a +} + +//go:noinline +func div_int16_1_ssa(a int16) int16 { + return a / 1 +} + +//go:noinline +func div_1_int16_ssa(a int16) int16 { + return 1 / a +} + +//go:noinline +func div_int16_32766_ssa(a int16) int16 { + return a / 32766 +} + +//go:noinline +func div_32766_int16_ssa(a int16) int16 { + return 32766 / a +} + +//go:noinline +func div_int16_32767_ssa(a int16) int16 { + return a / 32767 +} + +//go:noinline +func div_32767_int16_ssa(a int16) int16 { + return 32767 / a +} + +//go:noinline +func mul_int16_Neg32768_ssa(a int16) int16 { + return a * -32768 +} + +//go:noinline +func mul_Neg32768_int16_ssa(a int16) int16 { + return -32768 * a +} + +//go:noinline +func mul_int16_Neg32767_ssa(a int16) int16 { + return a * -32767 +} + +//go:noinline +func mul_Neg32767_int16_ssa(a int16) int16 { + return -32767 * a +} + +//go:noinline +func mul_int16_Neg1_ssa(a int16) int16 { + return a * -1 +} + +//go:noinline +func mul_Neg1_int16_ssa(a int16) int16 { + return -1 * a +} + +//go:noinline +func mul_int16_0_ssa(a int16) int16 { + return a * 0 +} + +//go:noinline +func mul_0_int16_ssa(a int16) int16 { + return 0 * a +} + +//go:noinline +func mul_int16_1_ssa(a int16) int16 { + return a * 1 +} + +//go:noinline +func mul_1_int16_ssa(a int16) int16 { + return 1 * a +} + +//go:noinline +func mul_int16_32766_ssa(a int16) int16 { + return a * 32766 +} + +//go:noinline +func mul_32766_int16_ssa(a int16) int16 { + return 32766 * a +} + +//go:noinline +func mul_int16_32767_ssa(a int16) int16 { + return a * 32767 +} + +//go:noinline +func mul_32767_int16_ssa(a int16) int16 { + return 32767 * a +} + +//go:noinline +func add_uint8_0_ssa(a uint8) uint8 { + return a + 0 +} + +//go:noinline +func add_0_uint8_ssa(a uint8) uint8 { + return 0 + a +} + +//go:noinline +func add_uint8_1_ssa(a uint8) uint8 { + return a + 1 +} + +//go:noinline +func add_1_uint8_ssa(a uint8) uint8 { + return 1 + a +} + +//go:noinline +func add_uint8_255_ssa(a uint8) uint8 { + return a + 255 +} + +//go:noinline +func add_255_uint8_ssa(a uint8) uint8 { + return 255 + a +} + +//go:noinline +func sub_uint8_0_ssa(a uint8) uint8 { + return a - 0 +} + +//go:noinline +func sub_0_uint8_ssa(a uint8) uint8 { + return 0 - a +} + +//go:noinline +func sub_uint8_1_ssa(a uint8) uint8 { + return a - 1 +} + +//go:noinline +func sub_1_uint8_ssa(a uint8) uint8 { + return 1 - a +} + +//go:noinline +func sub_uint8_255_ssa(a uint8) uint8 { + return a - 255 +} + +//go:noinline +func sub_255_uint8_ssa(a uint8) uint8 { + return 255 - a +} + +//go:noinline +func div_0_uint8_ssa(a uint8) uint8 { + return 0 / a +} + +//go:noinline +func div_uint8_1_ssa(a uint8) uint8 { + return a / 1 +} + +//go:noinline +func div_1_uint8_ssa(a uint8) uint8 { + return 1 / a +} + +//go:noinline +func div_uint8_255_ssa(a uint8) uint8 { + return a / 255 +} + +//go:noinline +func div_255_uint8_ssa(a uint8) uint8 { + return 255 / a +} + +//go:noinline +func mul_uint8_0_ssa(a uint8) uint8 { + return a * 0 +} + +//go:noinline +func mul_0_uint8_ssa(a uint8) uint8 { + return 0 * a +} + +//go:noinline +func mul_uint8_1_ssa(a uint8) uint8 { + return a * 1 +} + +//go:noinline +func mul_1_uint8_ssa(a uint8) uint8 { + return 1 * a +} + +//go:noinline +func mul_uint8_255_ssa(a uint8) uint8 { + return a * 255 +} + +//go:noinline +func mul_255_uint8_ssa(a uint8) uint8 { + return 255 * a +} + +//go:noinline +func lsh_uint8_0_ssa(a uint8) uint8 { + return a << 0 +} + +//go:noinline +func lsh_0_uint8_ssa(a uint8) uint8 { + return 0 << a +} + +//go:noinline +func lsh_uint8_1_ssa(a uint8) uint8 { + return a << 1 +} + +//go:noinline +func lsh_1_uint8_ssa(a uint8) uint8 { + return 1 << a +} + +//go:noinline +func lsh_uint8_255_ssa(a uint8) uint8 { + return a << 255 +} + +//go:noinline +func lsh_255_uint8_ssa(a uint8) uint8 { + return 255 << a +} + +//go:noinline +func rsh_uint8_0_ssa(a uint8) uint8 { + return a >> 0 +} + +//go:noinline +func rsh_0_uint8_ssa(a uint8) uint8 { + return 0 >> a +} + +//go:noinline +func rsh_uint8_1_ssa(a uint8) uint8 { + return a >> 1 +} + +//go:noinline +func rsh_1_uint8_ssa(a uint8) uint8 { + return 1 >> a +} + +//go:noinline +func rsh_uint8_255_ssa(a uint8) uint8 { + return a >> 255 +} + +//go:noinline +func rsh_255_uint8_ssa(a uint8) uint8 { + return 255 >> a +} + +//go:noinline +func add_int8_Neg128_ssa(a int8) int8 { + return a + -128 +} + +//go:noinline +func add_Neg128_int8_ssa(a int8) int8 { + return -128 + a +} + +//go:noinline +func add_int8_Neg127_ssa(a int8) int8 { + return a + -127 +} + +//go:noinline +func add_Neg127_int8_ssa(a int8) int8 { + return -127 + a +} + +//go:noinline +func add_int8_Neg1_ssa(a int8) int8 { + return a + -1 +} + +//go:noinline +func add_Neg1_int8_ssa(a int8) int8 { + return -1 + a +} + +//go:noinline +func add_int8_0_ssa(a int8) int8 { + return a + 0 +} + +//go:noinline +func add_0_int8_ssa(a int8) int8 { + return 0 + a +} + +//go:noinline +func add_int8_1_ssa(a int8) int8 { + return a + 1 +} + +//go:noinline +func add_1_int8_ssa(a int8) int8 { + return 1 + a +} + +//go:noinline +func add_int8_126_ssa(a int8) int8 { + return a + 126 +} + +//go:noinline +func add_126_int8_ssa(a int8) int8 { + return 126 + a +} + +//go:noinline +func add_int8_127_ssa(a int8) int8 { + return a + 127 +} + +//go:noinline +func add_127_int8_ssa(a int8) int8 { + return 127 + a +} + +//go:noinline +func sub_int8_Neg128_ssa(a int8) int8 { + return a - -128 +} + +//go:noinline +func sub_Neg128_int8_ssa(a int8) int8 { + return -128 - a +} + +//go:noinline +func sub_int8_Neg127_ssa(a int8) int8 { + return a - -127 +} + +//go:noinline +func sub_Neg127_int8_ssa(a int8) int8 { + return -127 - a +} + +//go:noinline +func sub_int8_Neg1_ssa(a int8) int8 { + return a - -1 +} + +//go:noinline +func sub_Neg1_int8_ssa(a int8) int8 { + return -1 - a +} + +//go:noinline +func sub_int8_0_ssa(a int8) int8 { + return a - 0 +} + +//go:noinline +func sub_0_int8_ssa(a int8) int8 { + return 0 - a +} + +//go:noinline +func sub_int8_1_ssa(a int8) int8 { + return a - 1 +} + +//go:noinline +func sub_1_int8_ssa(a int8) int8 { + return 1 - a +} + +//go:noinline +func sub_int8_126_ssa(a int8) int8 { + return a - 126 +} + +//go:noinline +func sub_126_int8_ssa(a int8) int8 { + return 126 - a +} + +//go:noinline +func sub_int8_127_ssa(a int8) int8 { + return a - 127 +} + +//go:noinline +func sub_127_int8_ssa(a int8) int8 { + return 127 - a +} + +//go:noinline +func div_int8_Neg128_ssa(a int8) int8 { + return a / -128 +} + +//go:noinline +func div_Neg128_int8_ssa(a int8) int8 { + return -128 / a +} + +//go:noinline +func div_int8_Neg127_ssa(a int8) int8 { + return a / -127 +} + +//go:noinline +func div_Neg127_int8_ssa(a int8) int8 { + return -127 / a +} + +//go:noinline +func div_int8_Neg1_ssa(a int8) int8 { + return a / -1 +} + +//go:noinline +func div_Neg1_int8_ssa(a int8) int8 { + return -1 / a +} + +//go:noinline +func div_0_int8_ssa(a int8) int8 { + return 0 / a +} + +//go:noinline +func div_int8_1_ssa(a int8) int8 { + return a / 1 +} + +//go:noinline +func div_1_int8_ssa(a int8) int8 { + return 1 / a +} + +//go:noinline +func div_int8_126_ssa(a int8) int8 { + return a / 126 +} + +//go:noinline +func div_126_int8_ssa(a int8) int8 { + return 126 / a +} + +//go:noinline +func div_int8_127_ssa(a int8) int8 { + return a / 127 +} + +//go:noinline +func div_127_int8_ssa(a int8) int8 { + return 127 / a +} + +//go:noinline +func mul_int8_Neg128_ssa(a int8) int8 { + return a * -128 +} + +//go:noinline +func mul_Neg128_int8_ssa(a int8) int8 { + return -128 * a +} + +//go:noinline +func mul_int8_Neg127_ssa(a int8) int8 { + return a * -127 +} + +//go:noinline +func mul_Neg127_int8_ssa(a int8) int8 { + return -127 * a +} + +//go:noinline +func mul_int8_Neg1_ssa(a int8) int8 { + return a * -1 +} + +//go:noinline +func mul_Neg1_int8_ssa(a int8) int8 { + return -1 * a +} + +//go:noinline +func mul_int8_0_ssa(a int8) int8 { + return a * 0 +} + +//go:noinline +func mul_0_int8_ssa(a int8) int8 { + return 0 * a +} + +//go:noinline +func mul_int8_1_ssa(a int8) int8 { + return a * 1 +} + +//go:noinline +func mul_1_int8_ssa(a int8) int8 { + return 1 * a +} + +//go:noinline +func mul_int8_126_ssa(a int8) int8 { + return a * 126 +} + +//go:noinline +func mul_126_int8_ssa(a int8) int8 { + return 126 * a +} + +//go:noinline +func mul_int8_127_ssa(a int8) int8 { + return a * 127 +} + +//go:noinline +func mul_127_int8_ssa(a int8) int8 { + return 127 * a +} + +var failed bool + +func main() { + + if got := add_0_uint64_ssa(0); got != 0 { + fmt.Printf("add_uint64 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint64_0_ssa(0); got != 0 { + fmt.Printf("add_uint64 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_uint64_ssa(1); got != 1 { + fmt.Printf("add_uint64 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint64_0_ssa(1); got != 1 { + fmt.Printf("add_uint64 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint64_ssa(4294967296); got != 4294967296 { + fmt.Printf("add_uint64 0+4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_uint64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("add_uint64 4294967296+0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_0_uint64_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("add_uint64 0+18446744073709551615 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := add_uint64_0_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("add_uint64 18446744073709551615+0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := add_1_uint64_ssa(0); got != 1 { + fmt.Printf("add_uint64 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint64_1_ssa(0); got != 1 { + fmt.Printf("add_uint64 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_uint64_ssa(1); got != 2 { + fmt.Printf("add_uint64 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_uint64_1_ssa(1); got != 2 { + fmt.Printf("add_uint64 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_uint64_ssa(4294967296); got != 4294967297 { + fmt.Printf("add_uint64 1+4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_uint64_1_ssa(4294967296); got != 4294967297 { + fmt.Printf("add_uint64 4294967296+1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_1_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("add_uint64 1+18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint64_1_ssa(18446744073709551615); got != 0 { + fmt.Printf("add_uint64 18446744073709551615+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_4294967296_uint64_ssa(0); got != 4294967296 { + fmt.Printf("add_uint64 4294967296+0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_uint64_4294967296_ssa(0); got != 4294967296 { + fmt.Printf("add_uint64 0+4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_4294967296_uint64_ssa(1); got != 4294967297 { + fmt.Printf("add_uint64 4294967296+1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_uint64_4294967296_ssa(1); got != 4294967297 { + fmt.Printf("add_uint64 1+4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_4294967296_uint64_ssa(4294967296); got != 8589934592 { + fmt.Printf("add_uint64 4294967296+4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := add_uint64_4294967296_ssa(4294967296); got != 8589934592 { + fmt.Printf("add_uint64 4294967296+4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := add_4294967296_uint64_ssa(18446744073709551615); got != 4294967295 { + fmt.Printf("add_uint64 4294967296+18446744073709551615 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_uint64_4294967296_ssa(18446744073709551615); got != 4294967295 { + fmt.Printf("add_uint64 18446744073709551615+4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_18446744073709551615_uint64_ssa(0); got != 18446744073709551615 { + fmt.Printf("add_uint64 18446744073709551615+0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := add_uint64_18446744073709551615_ssa(0); got != 18446744073709551615 { + fmt.Printf("add_uint64 0+18446744073709551615 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := add_18446744073709551615_uint64_ssa(1); got != 0 { + fmt.Printf("add_uint64 18446744073709551615+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint64_18446744073709551615_ssa(1); got != 0 { + fmt.Printf("add_uint64 1+18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := add_18446744073709551615_uint64_ssa(4294967296); got != 4294967295 { + fmt.Printf("add_uint64 18446744073709551615+4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_uint64_18446744073709551615_ssa(4294967296); got != 4294967295 { + fmt.Printf("add_uint64 4294967296+18446744073709551615 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_18446744073709551615_uint64_ssa(18446744073709551615); got != 18446744073709551614 { + fmt.Printf("add_uint64 18446744073709551615+18446744073709551615 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := add_uint64_18446744073709551615_ssa(18446744073709551615); got != 18446744073709551614 { + fmt.Printf("add_uint64 18446744073709551615+18446744073709551615 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := sub_0_uint64_ssa(0); got != 0 { + fmt.Printf("sub_uint64 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint64_0_ssa(0); got != 0 { + fmt.Printf("sub_uint64 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_uint64_ssa(1); got != 18446744073709551615 { + fmt.Printf("sub_uint64 0-1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := sub_uint64_0_ssa(1); got != 1 { + fmt.Printf("sub_uint64 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_uint64_ssa(4294967296); got != 18446744069414584320 { + fmt.Printf("sub_uint64 0-4294967296 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := sub_uint64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("sub_uint64 4294967296-0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_0_uint64_ssa(18446744073709551615); got != 1 { + fmt.Printf("sub_uint64 0-18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint64_0_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("sub_uint64 18446744073709551615-0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := sub_1_uint64_ssa(0); got != 1 { + fmt.Printf("sub_uint64 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint64_1_ssa(0); got != 18446744073709551615 { + fmt.Printf("sub_uint64 0-1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := sub_1_uint64_ssa(1); got != 0 { + fmt.Printf("sub_uint64 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint64_1_ssa(1); got != 0 { + fmt.Printf("sub_uint64 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_uint64_ssa(4294967296); got != 18446744069414584321 { + fmt.Printf("sub_uint64 1-4294967296 = %d, wanted 18446744069414584321\n", got) + failed = true + } + + if got := sub_uint64_1_ssa(4294967296); got != 4294967295 { + fmt.Printf("sub_uint64 4294967296-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_1_uint64_ssa(18446744073709551615); got != 2 { + fmt.Printf("sub_uint64 1-18446744073709551615 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_uint64_1_ssa(18446744073709551615); got != 18446744073709551614 { + fmt.Printf("sub_uint64 18446744073709551615-1 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := sub_4294967296_uint64_ssa(0); got != 4294967296 { + fmt.Printf("sub_uint64 4294967296-0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_uint64_4294967296_ssa(0); got != 18446744069414584320 { + fmt.Printf("sub_uint64 0-4294967296 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := sub_4294967296_uint64_ssa(1); got != 4294967295 { + fmt.Printf("sub_uint64 4294967296-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_uint64_4294967296_ssa(1); got != 18446744069414584321 { + fmt.Printf("sub_uint64 1-4294967296 = %d, wanted 18446744069414584321\n", got) + failed = true + } + + if got := sub_4294967296_uint64_ssa(4294967296); got != 0 { + fmt.Printf("sub_uint64 4294967296-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("sub_uint64 4294967296-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_4294967296_uint64_ssa(18446744073709551615); got != 4294967297 { + fmt.Printf("sub_uint64 4294967296-18446744073709551615 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_uint64_4294967296_ssa(18446744073709551615); got != 18446744069414584319 { + fmt.Printf("sub_uint64 18446744073709551615-4294967296 = %d, wanted 18446744069414584319\n", got) + failed = true + } + + if got := sub_18446744073709551615_uint64_ssa(0); got != 18446744073709551615 { + fmt.Printf("sub_uint64 18446744073709551615-0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := sub_uint64_18446744073709551615_ssa(0); got != 1 { + fmt.Printf("sub_uint64 0-18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_18446744073709551615_uint64_ssa(1); got != 18446744073709551614 { + fmt.Printf("sub_uint64 18446744073709551615-1 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := sub_uint64_18446744073709551615_ssa(1); got != 2 { + fmt.Printf("sub_uint64 1-18446744073709551615 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_18446744073709551615_uint64_ssa(4294967296); got != 18446744069414584319 { + fmt.Printf("sub_uint64 18446744073709551615-4294967296 = %d, wanted 18446744069414584319\n", got) + failed = true + } + + if got := sub_uint64_18446744073709551615_ssa(4294967296); got != 4294967297 { + fmt.Printf("sub_uint64 4294967296-18446744073709551615 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_18446744073709551615_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("sub_uint64 18446744073709551615-18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint64_18446744073709551615_ssa(18446744073709551615); got != 0 { + fmt.Printf("sub_uint64 18446744073709551615-18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint64_ssa(1); got != 0 { + fmt.Printf("div_uint64 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint64_ssa(4294967296); got != 0 { + fmt.Printf("div_uint64 0/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("div_uint64 0/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint64_1_ssa(0); got != 0 { + fmt.Printf("div_uint64 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_uint64_ssa(1); got != 1 { + fmt.Printf("div_uint64 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint64_1_ssa(1); got != 1 { + fmt.Printf("div_uint64 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_uint64_ssa(4294967296); got != 0 { + fmt.Printf("div_uint64 1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint64_1_ssa(4294967296); got != 4294967296 { + fmt.Printf("div_uint64 4294967296/1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_1_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("div_uint64 1/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint64_1_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("div_uint64 18446744073709551615/1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := div_uint64_4294967296_ssa(0); got != 0 { + fmt.Printf("div_uint64 0/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967296_uint64_ssa(1); got != 4294967296 { + fmt.Printf("div_uint64 4294967296/1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_uint64_4294967296_ssa(1); got != 0 { + fmt.Printf("div_uint64 1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967296_uint64_ssa(4294967296); got != 1 { + fmt.Printf("div_uint64 4294967296/4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint64_4294967296_ssa(4294967296); got != 1 { + fmt.Printf("div_uint64 4294967296/4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_4294967296_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("div_uint64 4294967296/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint64_4294967296_ssa(18446744073709551615); got != 4294967295 { + fmt.Printf("div_uint64 18446744073709551615/4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := div_uint64_18446744073709551615_ssa(0); got != 0 { + fmt.Printf("div_uint64 0/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_18446744073709551615_uint64_ssa(1); got != 18446744073709551615 { + fmt.Printf("div_uint64 18446744073709551615/1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := div_uint64_18446744073709551615_ssa(1); got != 0 { + fmt.Printf("div_uint64 1/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_18446744073709551615_uint64_ssa(4294967296); got != 4294967295 { + fmt.Printf("div_uint64 18446744073709551615/4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := div_uint64_18446744073709551615_ssa(4294967296); got != 0 { + fmt.Printf("div_uint64 4294967296/18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := div_18446744073709551615_uint64_ssa(18446744073709551615); got != 1 { + fmt.Printf("div_uint64 18446744073709551615/18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint64_18446744073709551615_ssa(18446744073709551615); got != 1 { + fmt.Printf("div_uint64 18446744073709551615/18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_0_uint64_ssa(0); got != 0 { + fmt.Printf("mul_uint64 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_0_ssa(0); got != 0 { + fmt.Printf("mul_uint64 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint64_ssa(1); got != 0 { + fmt.Printf("mul_uint64 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_0_ssa(1); got != 0 { + fmt.Printf("mul_uint64 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint64_ssa(4294967296); got != 0 { + fmt.Printf("mul_uint64 0*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_0_ssa(4294967296); got != 0 { + fmt.Printf("mul_uint64 4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("mul_uint64 0*18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_0_ssa(18446744073709551615); got != 0 { + fmt.Printf("mul_uint64 18446744073709551615*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint64_ssa(0); got != 0 { + fmt.Printf("mul_uint64 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_1_ssa(0); got != 0 { + fmt.Printf("mul_uint64 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint64_ssa(1); got != 1 { + fmt.Printf("mul_uint64 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint64_1_ssa(1); got != 1 { + fmt.Printf("mul_uint64 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_uint64_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_uint64 1*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_uint64_1_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_uint64 4294967296*1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_1_uint64_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("mul_uint64 1*18446744073709551615 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := mul_uint64_1_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("mul_uint64 18446744073709551615*1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := mul_4294967296_uint64_ssa(0); got != 0 { + fmt.Printf("mul_uint64 4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_4294967296_ssa(0); got != 0 { + fmt.Printf("mul_uint64 0*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_uint64_ssa(1); got != 4294967296 { + fmt.Printf("mul_uint64 4294967296*1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_uint64_4294967296_ssa(1); got != 4294967296 { + fmt.Printf("mul_uint64 1*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_4294967296_uint64_ssa(4294967296); got != 0 { + fmt.Printf("mul_uint64 4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("mul_uint64 4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_uint64_ssa(18446744073709551615); got != 18446744069414584320 { + fmt.Printf("mul_uint64 4294967296*18446744073709551615 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := mul_uint64_4294967296_ssa(18446744073709551615); got != 18446744069414584320 { + fmt.Printf("mul_uint64 18446744073709551615*4294967296 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := mul_18446744073709551615_uint64_ssa(0); got != 0 { + fmt.Printf("mul_uint64 18446744073709551615*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint64_18446744073709551615_ssa(0); got != 0 { + fmt.Printf("mul_uint64 0*18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_18446744073709551615_uint64_ssa(1); got != 18446744073709551615 { + fmt.Printf("mul_uint64 18446744073709551615*1 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := mul_uint64_18446744073709551615_ssa(1); got != 18446744073709551615 { + fmt.Printf("mul_uint64 1*18446744073709551615 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := mul_18446744073709551615_uint64_ssa(4294967296); got != 18446744069414584320 { + fmt.Printf("mul_uint64 18446744073709551615*4294967296 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := mul_uint64_18446744073709551615_ssa(4294967296); got != 18446744069414584320 { + fmt.Printf("mul_uint64 4294967296*18446744073709551615 = %d, wanted 18446744069414584320\n", got) + failed = true + } + + if got := mul_18446744073709551615_uint64_ssa(18446744073709551615); got != 1 { + fmt.Printf("mul_uint64 18446744073709551615*18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint64_18446744073709551615_ssa(18446744073709551615); got != 1 { + fmt.Printf("mul_uint64 18446744073709551615*18446744073709551615 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint64_ssa(0); got != 0 { + fmt.Printf("lsh_uint64 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_0_ssa(0); got != 0 { + fmt.Printf("lsh_uint64 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_0_uint64_ssa(1); got != 0 { + fmt.Printf("lsh_uint64 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_0_ssa(1); got != 1 { + fmt.Printf("lsh_uint64 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint64_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 0<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("lsh_uint64 4294967296<<0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := lsh_0_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 0<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_0_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("lsh_uint64 18446744073709551615<<0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := lsh_1_uint64_ssa(0); got != 1 { + fmt.Printf("lsh_uint64 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_uint64_1_ssa(0); got != 0 { + fmt.Printf("lsh_uint64 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_1_uint64_ssa(1); got != 2 { + fmt.Printf("lsh_uint64 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_uint64_1_ssa(1); got != 2 { + fmt.Printf("lsh_uint64 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_1_uint64_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 1<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_1_ssa(4294967296); got != 8589934592 { + fmt.Printf("lsh_uint64 4294967296<<1 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := lsh_1_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 1<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_1_ssa(18446744073709551615); got != 18446744073709551614 { + fmt.Printf("lsh_uint64 18446744073709551615<<1 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := lsh_4294967296_uint64_ssa(0); got != 4294967296 { + fmt.Printf("lsh_uint64 4294967296<<0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := lsh_uint64_4294967296_ssa(0); got != 0 { + fmt.Printf("lsh_uint64 0<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_4294967296_uint64_ssa(1); got != 8589934592 { + fmt.Printf("lsh_uint64 4294967296<<1 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := lsh_uint64_4294967296_ssa(1); got != 0 { + fmt.Printf("lsh_uint64 1<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_4294967296_uint64_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 4294967296<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 4294967296<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_4294967296_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 4294967296<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_4294967296_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 18446744073709551615<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_18446744073709551615_uint64_ssa(0); got != 18446744073709551615 { + fmt.Printf("lsh_uint64 18446744073709551615<<0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := lsh_uint64_18446744073709551615_ssa(0); got != 0 { + fmt.Printf("lsh_uint64 0<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_18446744073709551615_uint64_ssa(1); got != 18446744073709551614 { + fmt.Printf("lsh_uint64 18446744073709551615<<1 = %d, wanted 18446744073709551614\n", got) + failed = true + } + + if got := lsh_uint64_18446744073709551615_ssa(1); got != 0 { + fmt.Printf("lsh_uint64 1<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_18446744073709551615_uint64_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 18446744073709551615<<4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_18446744073709551615_ssa(4294967296); got != 0 { + fmt.Printf("lsh_uint64 4294967296<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_18446744073709551615_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 18446744073709551615<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint64_18446744073709551615_ssa(18446744073709551615); got != 0 { + fmt.Printf("lsh_uint64 18446744073709551615<<18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint64_ssa(0); got != 0 { + fmt.Printf("rsh_uint64 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_0_ssa(0); got != 0 { + fmt.Printf("rsh_uint64 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint64_ssa(1); got != 0 { + fmt.Printf("rsh_uint64 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_0_ssa(1); got != 1 { + fmt.Printf("rsh_uint64 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_0_uint64_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 0>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("rsh_uint64 4294967296>>0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := rsh_0_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 0>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_0_ssa(18446744073709551615); got != 18446744073709551615 { + fmt.Printf("rsh_uint64 18446744073709551615>>0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := rsh_1_uint64_ssa(0); got != 1 { + fmt.Printf("rsh_uint64 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_uint64_1_ssa(0); got != 0 { + fmt.Printf("rsh_uint64 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint64_ssa(1); got != 0 { + fmt.Printf("rsh_uint64 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_1_ssa(1); got != 0 { + fmt.Printf("rsh_uint64 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint64_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 1>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_1_ssa(4294967296); got != 2147483648 { + fmt.Printf("rsh_uint64 4294967296>>1 = %d, wanted 2147483648\n", got) + failed = true + } + + if got := rsh_1_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 1>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_1_ssa(18446744073709551615); got != 9223372036854775807 { + fmt.Printf("rsh_uint64 18446744073709551615>>1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := rsh_4294967296_uint64_ssa(0); got != 4294967296 { + fmt.Printf("rsh_uint64 4294967296>>0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := rsh_uint64_4294967296_ssa(0); got != 0 { + fmt.Printf("rsh_uint64 0>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_4294967296_uint64_ssa(1); got != 2147483648 { + fmt.Printf("rsh_uint64 4294967296>>1 = %d, wanted 2147483648\n", got) + failed = true + } + + if got := rsh_uint64_4294967296_ssa(1); got != 0 { + fmt.Printf("rsh_uint64 1>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_4294967296_uint64_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 4294967296>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 4294967296>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_4294967296_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 4294967296>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_4294967296_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 18446744073709551615>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_18446744073709551615_uint64_ssa(0); got != 18446744073709551615 { + fmt.Printf("rsh_uint64 18446744073709551615>>0 = %d, wanted 18446744073709551615\n", got) + failed = true + } + + if got := rsh_uint64_18446744073709551615_ssa(0); got != 0 { + fmt.Printf("rsh_uint64 0>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_18446744073709551615_uint64_ssa(1); got != 9223372036854775807 { + fmt.Printf("rsh_uint64 18446744073709551615>>1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := rsh_uint64_18446744073709551615_ssa(1); got != 0 { + fmt.Printf("rsh_uint64 1>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_18446744073709551615_uint64_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 18446744073709551615>>4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_18446744073709551615_ssa(4294967296); got != 0 { + fmt.Printf("rsh_uint64 4294967296>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_18446744073709551615_uint64_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 18446744073709551615>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint64_18446744073709551615_ssa(18446744073709551615); got != 0 { + fmt.Printf("rsh_uint64 18446744073709551615>>18446744073709551615 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("add_int64 -9223372036854775808+-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(-9223372036854775808); got != 0 { + fmt.Printf("add_int64 -9223372036854775808+-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(-9223372036854775807); got != 1 { + fmt.Printf("add_int64 -9223372036854775808+-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(-9223372036854775807); got != 1 { + fmt.Printf("add_int64 -9223372036854775807+-9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(-4294967296); got != 9223372032559808512 { + fmt.Printf("add_int64 -9223372036854775808+-4294967296 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(-4294967296); got != 9223372032559808512 { + fmt.Printf("add_int64 -4294967296+-9223372036854775808 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(-1); got != 9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775808+-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(-1); got != 9223372036854775807 { + fmt.Printf("add_int64 -1+-9223372036854775808 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(0); got != -9223372036854775808 { + fmt.Printf("add_int64 -9223372036854775808+0 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(0); got != -9223372036854775808 { + fmt.Printf("add_int64 0+-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(1); got != -9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775808+1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(1); got != -9223372036854775807 { + fmt.Printf("add_int64 1+-9223372036854775808 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(4294967296); got != -9223372032559808512 { + fmt.Printf("add_int64 -9223372036854775808+4294967296 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(4294967296); got != -9223372032559808512 { + fmt.Printf("add_int64 4294967296+-9223372036854775808 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(9223372036854775806); got != -2 { + fmt.Printf("add_int64 -9223372036854775808+9223372036854775806 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(9223372036854775806); got != -2 { + fmt.Printf("add_int64 9223372036854775806+-9223372036854775808 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg9223372036854775808_int64_ssa(9223372036854775807); got != -1 { + fmt.Printf("add_int64 -9223372036854775808+9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775808_ssa(9223372036854775807); got != -1 { + fmt.Printf("add_int64 9223372036854775807+-9223372036854775808 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(-9223372036854775808); got != 1 { + fmt.Printf("add_int64 -9223372036854775807+-9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(-9223372036854775808); got != 1 { + fmt.Printf("add_int64 -9223372036854775808+-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(-9223372036854775807); got != 2 { + fmt.Printf("add_int64 -9223372036854775807+-9223372036854775807 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(-9223372036854775807); got != 2 { + fmt.Printf("add_int64 -9223372036854775807+-9223372036854775807 = %d, wanted 2\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(-4294967296); got != 9223372032559808513 { + fmt.Printf("add_int64 -9223372036854775807+-4294967296 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(-4294967296); got != 9223372032559808513 { + fmt.Printf("add_int64 -4294967296+-9223372036854775807 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(-1); got != -9223372036854775808 { + fmt.Printf("add_int64 -9223372036854775807+-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(-1); got != -9223372036854775808 { + fmt.Printf("add_int64 -1+-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(0); got != -9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775807+0 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(0); got != -9223372036854775807 { + fmt.Printf("add_int64 0+-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(1); got != -9223372036854775806 { + fmt.Printf("add_int64 -9223372036854775807+1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(1); got != -9223372036854775806 { + fmt.Printf("add_int64 1+-9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(4294967296); got != -9223372032559808511 { + fmt.Printf("add_int64 -9223372036854775807+4294967296 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(4294967296); got != -9223372032559808511 { + fmt.Printf("add_int64 4294967296+-9223372036854775807 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(9223372036854775806); got != -1 { + fmt.Printf("add_int64 -9223372036854775807+9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(9223372036854775806); got != -1 { + fmt.Printf("add_int64 9223372036854775806+-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg9223372036854775807_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("add_int64 -9223372036854775807+9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_Neg9223372036854775807_ssa(9223372036854775807); got != 0 { + fmt.Printf("add_int64 9223372036854775807+-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(-9223372036854775808); got != 9223372032559808512 { + fmt.Printf("add_int64 -4294967296+-9223372036854775808 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(-9223372036854775808); got != 9223372032559808512 { + fmt.Printf("add_int64 -9223372036854775808+-4294967296 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(-9223372036854775807); got != 9223372032559808513 { + fmt.Printf("add_int64 -4294967296+-9223372036854775807 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(-9223372036854775807); got != 9223372032559808513 { + fmt.Printf("add_int64 -9223372036854775807+-4294967296 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(-4294967296); got != -8589934592 { + fmt.Printf("add_int64 -4294967296+-4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(-4294967296); got != -8589934592 { + fmt.Printf("add_int64 -4294967296+-4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(-1); got != -4294967297 { + fmt.Printf("add_int64 -4294967296+-1 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(-1); got != -4294967297 { + fmt.Printf("add_int64 -1+-4294967296 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(0); got != -4294967296 { + fmt.Printf("add_int64 -4294967296+0 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(0); got != -4294967296 { + fmt.Printf("add_int64 0+-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(1); got != -4294967295 { + fmt.Printf("add_int64 -4294967296+1 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(1); got != -4294967295 { + fmt.Printf("add_int64 1+-4294967296 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(4294967296); got != 0 { + fmt.Printf("add_int64 -4294967296+4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(4294967296); got != 0 { + fmt.Printf("add_int64 4294967296+-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(9223372036854775806); got != 9223372032559808510 { + fmt.Printf("add_int64 -4294967296+9223372036854775806 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(9223372036854775806); got != 9223372032559808510 { + fmt.Printf("add_int64 9223372036854775806+-4294967296 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := add_Neg4294967296_int64_ssa(9223372036854775807); got != 9223372032559808511 { + fmt.Printf("add_int64 -4294967296+9223372036854775807 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := add_int64_Neg4294967296_ssa(9223372036854775807); got != 9223372032559808511 { + fmt.Printf("add_int64 9223372036854775807+-4294967296 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(-9223372036854775808); got != 9223372036854775807 { + fmt.Printf("add_int64 -1+-9223372036854775808 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(-9223372036854775808); got != 9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775808+-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("add_int64 -1+-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("add_int64 -9223372036854775807+-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(-4294967296); got != -4294967297 { + fmt.Printf("add_int64 -1+-4294967296 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(-4294967296); got != -4294967297 { + fmt.Printf("add_int64 -4294967296+-1 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(-1); got != -2 { + fmt.Printf("add_int64 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(-1); got != -2 { + fmt.Printf("add_int64 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(0); got != -1 { + fmt.Printf("add_int64 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(0); got != -1 { + fmt.Printf("add_int64 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(1); got != 0 { + fmt.Printf("add_int64 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(1); got != 0 { + fmt.Printf("add_int64 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(4294967296); got != 4294967295 { + fmt.Printf("add_int64 -1+4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(4294967296); got != 4294967295 { + fmt.Printf("add_int64 4294967296+-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(9223372036854775806); got != 9223372036854775805 { + fmt.Printf("add_int64 -1+9223372036854775806 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(9223372036854775806); got != 9223372036854775805 { + fmt.Printf("add_int64 9223372036854775806+-1 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := add_Neg1_int64_ssa(9223372036854775807); got != 9223372036854775806 { + fmt.Printf("add_int64 -1+9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_int64_Neg1_ssa(9223372036854775807); got != 9223372036854775806 { + fmt.Printf("add_int64 9223372036854775807+-1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_0_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("add_int64 0+-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_0_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("add_int64 -9223372036854775808+0 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_0_int64_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("add_int64 0+-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_int64_0_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775807+0 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_0_int64_ssa(-4294967296); got != -4294967296 { + fmt.Printf("add_int64 0+-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := add_int64_0_ssa(-4294967296); got != -4294967296 { + fmt.Printf("add_int64 -4294967296+0 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := add_0_int64_ssa(-1); got != -1 { + fmt.Printf("add_int64 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_0_ssa(-1); got != -1 { + fmt.Printf("add_int64 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_0_int64_ssa(0); got != 0 { + fmt.Printf("add_int64 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_0_ssa(0); got != 0 { + fmt.Printf("add_int64 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_int64_ssa(1); got != 1 { + fmt.Printf("add_int64 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int64_0_ssa(1); got != 1 { + fmt.Printf("add_int64 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_int64_ssa(4294967296); got != 4294967296 { + fmt.Printf("add_int64 0+4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_int64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("add_int64 4294967296+0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_0_int64_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("add_int64 0+9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_int64_0_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("add_int64 9223372036854775806+0 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_0_int64_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("add_int64 0+9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_0_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("add_int64 9223372036854775807+0 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_1_int64_ssa(-9223372036854775808); got != -9223372036854775807 { + fmt.Printf("add_int64 1+-9223372036854775808 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_int64_1_ssa(-9223372036854775808); got != -9223372036854775807 { + fmt.Printf("add_int64 -9223372036854775808+1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := add_1_int64_ssa(-9223372036854775807); got != -9223372036854775806 { + fmt.Printf("add_int64 1+-9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := add_int64_1_ssa(-9223372036854775807); got != -9223372036854775806 { + fmt.Printf("add_int64 -9223372036854775807+1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := add_1_int64_ssa(-4294967296); got != -4294967295 { + fmt.Printf("add_int64 1+-4294967296 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := add_int64_1_ssa(-4294967296); got != -4294967295 { + fmt.Printf("add_int64 -4294967296+1 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := add_1_int64_ssa(-1); got != 0 { + fmt.Printf("add_int64 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_1_ssa(-1); got != 0 { + fmt.Printf("add_int64 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_1_int64_ssa(0); got != 1 { + fmt.Printf("add_int64 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int64_1_ssa(0); got != 1 { + fmt.Printf("add_int64 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_int64_ssa(1); got != 2 { + fmt.Printf("add_int64 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int64_1_ssa(1); got != 2 { + fmt.Printf("add_int64 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_int64_ssa(4294967296); got != 4294967297 { + fmt.Printf("add_int64 1+4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_int64_1_ssa(4294967296); got != 4294967297 { + fmt.Printf("add_int64 4294967296+1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_1_int64_ssa(9223372036854775806); got != 9223372036854775807 { + fmt.Printf("add_int64 1+9223372036854775806 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_1_ssa(9223372036854775806); got != 9223372036854775807 { + fmt.Printf("add_int64 9223372036854775806+1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_1_int64_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("add_int64 1+9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_1_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("add_int64 9223372036854775807+1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(-9223372036854775808); got != -9223372032559808512 { + fmt.Printf("add_int64 4294967296+-9223372036854775808 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(-9223372036854775808); got != -9223372032559808512 { + fmt.Printf("add_int64 -9223372036854775808+4294967296 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(-9223372036854775807); got != -9223372032559808511 { + fmt.Printf("add_int64 4294967296+-9223372036854775807 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(-9223372036854775807); got != -9223372032559808511 { + fmt.Printf("add_int64 -9223372036854775807+4294967296 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(-4294967296); got != 0 { + fmt.Printf("add_int64 4294967296+-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(-4294967296); got != 0 { + fmt.Printf("add_int64 -4294967296+4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(-1); got != 4294967295 { + fmt.Printf("add_int64 4294967296+-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(-1); got != 4294967295 { + fmt.Printf("add_int64 -1+4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(0); got != 4294967296 { + fmt.Printf("add_int64 4294967296+0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(0); got != 4294967296 { + fmt.Printf("add_int64 0+4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(1); got != 4294967297 { + fmt.Printf("add_int64 4294967296+1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(1); got != 4294967297 { + fmt.Printf("add_int64 1+4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(4294967296); got != 8589934592 { + fmt.Printf("add_int64 4294967296+4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(4294967296); got != 8589934592 { + fmt.Printf("add_int64 4294967296+4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(9223372036854775806); got != -9223372032559808514 { + fmt.Printf("add_int64 4294967296+9223372036854775806 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(9223372036854775806); got != -9223372032559808514 { + fmt.Printf("add_int64 9223372036854775806+4294967296 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := add_4294967296_int64_ssa(9223372036854775807); got != -9223372032559808513 { + fmt.Printf("add_int64 4294967296+9223372036854775807 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := add_int64_4294967296_ssa(9223372036854775807); got != -9223372032559808513 { + fmt.Printf("add_int64 9223372036854775807+4294967296 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(-9223372036854775808); got != -2 { + fmt.Printf("add_int64 9223372036854775806+-9223372036854775808 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(-9223372036854775808); got != -2 { + fmt.Printf("add_int64 -9223372036854775808+9223372036854775806 = %d, wanted -2\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(-9223372036854775807); got != -1 { + fmt.Printf("add_int64 9223372036854775806+-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(-9223372036854775807); got != -1 { + fmt.Printf("add_int64 -9223372036854775807+9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(-4294967296); got != 9223372032559808510 { + fmt.Printf("add_int64 9223372036854775806+-4294967296 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(-4294967296); got != 9223372032559808510 { + fmt.Printf("add_int64 -4294967296+9223372036854775806 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(-1); got != 9223372036854775805 { + fmt.Printf("add_int64 9223372036854775806+-1 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(-1); got != 9223372036854775805 { + fmt.Printf("add_int64 -1+9223372036854775806 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(0); got != 9223372036854775806 { + fmt.Printf("add_int64 9223372036854775806+0 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(0); got != 9223372036854775806 { + fmt.Printf("add_int64 0+9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(1); got != 9223372036854775807 { + fmt.Printf("add_int64 9223372036854775806+1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(1); got != 9223372036854775807 { + fmt.Printf("add_int64 1+9223372036854775806 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(4294967296); got != -9223372032559808514 { + fmt.Printf("add_int64 9223372036854775806+4294967296 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(4294967296); got != -9223372032559808514 { + fmt.Printf("add_int64 4294967296+9223372036854775806 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(9223372036854775806); got != -4 { + fmt.Printf("add_int64 9223372036854775806+9223372036854775806 = %d, wanted -4\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(9223372036854775806); got != -4 { + fmt.Printf("add_int64 9223372036854775806+9223372036854775806 = %d, wanted -4\n", got) + failed = true + } + + if got := add_9223372036854775806_int64_ssa(9223372036854775807); got != -3 { + fmt.Printf("add_int64 9223372036854775806+9223372036854775807 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int64_9223372036854775806_ssa(9223372036854775807); got != -3 { + fmt.Printf("add_int64 9223372036854775807+9223372036854775806 = %d, wanted -3\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(-9223372036854775808); got != -1 { + fmt.Printf("add_int64 9223372036854775807+-9223372036854775808 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(-9223372036854775808); got != -1 { + fmt.Printf("add_int64 -9223372036854775808+9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("add_int64 9223372036854775807+-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(-9223372036854775807); got != 0 { + fmt.Printf("add_int64 -9223372036854775807+9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(-4294967296); got != 9223372032559808511 { + fmt.Printf("add_int64 9223372036854775807+-4294967296 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(-4294967296); got != 9223372032559808511 { + fmt.Printf("add_int64 -4294967296+9223372036854775807 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(-1); got != 9223372036854775806 { + fmt.Printf("add_int64 9223372036854775807+-1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(-1); got != 9223372036854775806 { + fmt.Printf("add_int64 -1+9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(0); got != 9223372036854775807 { + fmt.Printf("add_int64 9223372036854775807+0 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(0); got != 9223372036854775807 { + fmt.Printf("add_int64 0+9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(1); got != -9223372036854775808 { + fmt.Printf("add_int64 9223372036854775807+1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(1); got != -9223372036854775808 { + fmt.Printf("add_int64 1+9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(4294967296); got != -9223372032559808513 { + fmt.Printf("add_int64 9223372036854775807+4294967296 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(4294967296); got != -9223372032559808513 { + fmt.Printf("add_int64 4294967296+9223372036854775807 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(9223372036854775806); got != -3 { + fmt.Printf("add_int64 9223372036854775807+9223372036854775806 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(9223372036854775806); got != -3 { + fmt.Printf("add_int64 9223372036854775806+9223372036854775807 = %d, wanted -3\n", got) + failed = true + } + + if got := add_9223372036854775807_int64_ssa(9223372036854775807); got != -2 { + fmt.Printf("add_int64 9223372036854775807+9223372036854775807 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int64_9223372036854775807_ssa(9223372036854775807); got != -2 { + fmt.Printf("add_int64 9223372036854775807+9223372036854775807 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("sub_int64 -9223372036854775808--9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(-9223372036854775808); got != 0 { + fmt.Printf("sub_int64 -9223372036854775808--9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(-9223372036854775807); got != -1 { + fmt.Printf("sub_int64 -9223372036854775808--9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(-9223372036854775807); got != 1 { + fmt.Printf("sub_int64 -9223372036854775807--9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(-4294967296); got != -9223372032559808512 { + fmt.Printf("sub_int64 -9223372036854775808--4294967296 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(-4294967296); got != 9223372032559808512 { + fmt.Printf("sub_int64 -4294967296--9223372036854775808 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(-1); got != -9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775808--1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(-1); got != 9223372036854775807 { + fmt.Printf("sub_int64 -1--9223372036854775808 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(0); got != -9223372036854775808 { + fmt.Printf("sub_int64 -9223372036854775808-0 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(0); got != -9223372036854775808 { + fmt.Printf("sub_int64 0--9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(1); got != 9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775808-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(1); got != -9223372036854775807 { + fmt.Printf("sub_int64 1--9223372036854775808 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(4294967296); got != 9223372032559808512 { + fmt.Printf("sub_int64 -9223372036854775808-4294967296 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(4294967296); got != -9223372032559808512 { + fmt.Printf("sub_int64 4294967296--9223372036854775808 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(9223372036854775806); got != 2 { + fmt.Printf("sub_int64 -9223372036854775808-9223372036854775806 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(9223372036854775806); got != -2 { + fmt.Printf("sub_int64 9223372036854775806--9223372036854775808 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg9223372036854775808_int64_ssa(9223372036854775807); got != 1 { + fmt.Printf("sub_int64 -9223372036854775808-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775808_ssa(9223372036854775807); got != -1 { + fmt.Printf("sub_int64 9223372036854775807--9223372036854775808 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(-9223372036854775808); got != 1 { + fmt.Printf("sub_int64 -9223372036854775807--9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(-9223372036854775808); got != -1 { + fmt.Printf("sub_int64 -9223372036854775808--9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("sub_int64 -9223372036854775807--9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(-9223372036854775807); got != 0 { + fmt.Printf("sub_int64 -9223372036854775807--9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(-4294967296); got != -9223372032559808511 { + fmt.Printf("sub_int64 -9223372036854775807--4294967296 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(-4294967296); got != 9223372032559808511 { + fmt.Printf("sub_int64 -4294967296--9223372036854775807 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(-1); got != -9223372036854775806 { + fmt.Printf("sub_int64 -9223372036854775807--1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(-1); got != 9223372036854775806 { + fmt.Printf("sub_int64 -1--9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(0); got != -9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775807-0 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(0); got != 9223372036854775807 { + fmt.Printf("sub_int64 0--9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(1); got != -9223372036854775808 { + fmt.Printf("sub_int64 -9223372036854775807-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(1); got != -9223372036854775808 { + fmt.Printf("sub_int64 1--9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(4294967296); got != 9223372032559808513 { + fmt.Printf("sub_int64 -9223372036854775807-4294967296 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(4294967296); got != -9223372032559808513 { + fmt.Printf("sub_int64 4294967296--9223372036854775807 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(9223372036854775806); got != 3 { + fmt.Printf("sub_int64 -9223372036854775807-9223372036854775806 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(9223372036854775806); got != -3 { + fmt.Printf("sub_int64 9223372036854775806--9223372036854775807 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_Neg9223372036854775807_int64_ssa(9223372036854775807); got != 2 { + fmt.Printf("sub_int64 -9223372036854775807-9223372036854775807 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int64_Neg9223372036854775807_ssa(9223372036854775807); got != -2 { + fmt.Printf("sub_int64 9223372036854775807--9223372036854775807 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(-9223372036854775808); got != 9223372032559808512 { + fmt.Printf("sub_int64 -4294967296--9223372036854775808 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(-9223372036854775808); got != -9223372032559808512 { + fmt.Printf("sub_int64 -9223372036854775808--4294967296 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(-9223372036854775807); got != 9223372032559808511 { + fmt.Printf("sub_int64 -4294967296--9223372036854775807 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(-9223372036854775807); got != -9223372032559808511 { + fmt.Printf("sub_int64 -9223372036854775807--4294967296 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(-4294967296); got != 0 { + fmt.Printf("sub_int64 -4294967296--4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(-4294967296); got != 0 { + fmt.Printf("sub_int64 -4294967296--4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(-1); got != -4294967295 { + fmt.Printf("sub_int64 -4294967296--1 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(-1); got != 4294967295 { + fmt.Printf("sub_int64 -1--4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(0); got != -4294967296 { + fmt.Printf("sub_int64 -4294967296-0 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(0); got != 4294967296 { + fmt.Printf("sub_int64 0--4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(1); got != -4294967297 { + fmt.Printf("sub_int64 -4294967296-1 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(1); got != 4294967297 { + fmt.Printf("sub_int64 1--4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(4294967296); got != -8589934592 { + fmt.Printf("sub_int64 -4294967296-4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(4294967296); got != 8589934592 { + fmt.Printf("sub_int64 4294967296--4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(9223372036854775806); got != 9223372032559808514 { + fmt.Printf("sub_int64 -4294967296-9223372036854775806 = %d, wanted 9223372032559808514\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(9223372036854775806); got != -9223372032559808514 { + fmt.Printf("sub_int64 9223372036854775806--4294967296 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := sub_Neg4294967296_int64_ssa(9223372036854775807); got != 9223372032559808513 { + fmt.Printf("sub_int64 -4294967296-9223372036854775807 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := sub_int64_Neg4294967296_ssa(9223372036854775807); got != -9223372032559808513 { + fmt.Printf("sub_int64 9223372036854775807--4294967296 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(-9223372036854775808); got != 9223372036854775807 { + fmt.Printf("sub_int64 -1--9223372036854775808 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(-9223372036854775808); got != -9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775808--1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(-9223372036854775807); got != 9223372036854775806 { + fmt.Printf("sub_int64 -1--9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(-9223372036854775807); got != -9223372036854775806 { + fmt.Printf("sub_int64 -9223372036854775807--1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(-4294967296); got != 4294967295 { + fmt.Printf("sub_int64 -1--4294967296 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(-4294967296); got != -4294967295 { + fmt.Printf("sub_int64 -4294967296--1 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(-1); got != 0 { + fmt.Printf("sub_int64 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(-1); got != 0 { + fmt.Printf("sub_int64 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(0); got != -1 { + fmt.Printf("sub_int64 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(0); got != 1 { + fmt.Printf("sub_int64 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(1); got != -2 { + fmt.Printf("sub_int64 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(1); got != 2 { + fmt.Printf("sub_int64 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(4294967296); got != -4294967297 { + fmt.Printf("sub_int64 -1-4294967296 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(4294967296); got != 4294967297 { + fmt.Printf("sub_int64 4294967296--1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(9223372036854775806); got != -9223372036854775807 { + fmt.Printf("sub_int64 -1-9223372036854775806 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(9223372036854775806); got != 9223372036854775807 { + fmt.Printf("sub_int64 9223372036854775806--1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_Neg1_int64_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("sub_int64 -1-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_Neg1_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("sub_int64 9223372036854775807--1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_0_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("sub_int64 0--9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_0_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("sub_int64 -9223372036854775808-0 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_0_int64_ssa(-9223372036854775807); got != 9223372036854775807 { + fmt.Printf("sub_int64 0--9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_0_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775807-0 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_0_int64_ssa(-4294967296); got != 4294967296 { + fmt.Printf("sub_int64 0--4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_int64_0_ssa(-4294967296); got != -4294967296 { + fmt.Printf("sub_int64 -4294967296-0 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := sub_0_int64_ssa(-1); got != 1 { + fmt.Printf("sub_int64 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int64_0_ssa(-1); got != -1 { + fmt.Printf("sub_int64 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_0_int64_ssa(0); got != 0 { + fmt.Printf("sub_int64 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_0_ssa(0); got != 0 { + fmt.Printf("sub_int64 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_int64_ssa(1); got != -1 { + fmt.Printf("sub_int64 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int64_0_ssa(1); got != 1 { + fmt.Printf("sub_int64 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_int64_ssa(4294967296); got != -4294967296 { + fmt.Printf("sub_int64 0-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := sub_int64_0_ssa(4294967296); got != 4294967296 { + fmt.Printf("sub_int64 4294967296-0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_0_int64_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("sub_int64 0-9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_0_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("sub_int64 9223372036854775806-0 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_0_int64_ssa(9223372036854775807); got != -9223372036854775807 { + fmt.Printf("sub_int64 0-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_0_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("sub_int64 9223372036854775807-0 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_1_int64_ssa(-9223372036854775808); got != -9223372036854775807 { + fmt.Printf("sub_int64 1--9223372036854775808 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_1_ssa(-9223372036854775808); got != 9223372036854775807 { + fmt.Printf("sub_int64 -9223372036854775808-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_1_int64_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("sub_int64 1--9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_1_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("sub_int64 -9223372036854775807-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_1_int64_ssa(-4294967296); got != 4294967297 { + fmt.Printf("sub_int64 1--4294967296 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_int64_1_ssa(-4294967296); got != -4294967297 { + fmt.Printf("sub_int64 -4294967296-1 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := sub_1_int64_ssa(-1); got != 2 { + fmt.Printf("sub_int64 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int64_1_ssa(-1); got != -2 { + fmt.Printf("sub_int64 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_1_int64_ssa(0); got != 1 { + fmt.Printf("sub_int64 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int64_1_ssa(0); got != -1 { + fmt.Printf("sub_int64 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_1_int64_ssa(1); got != 0 { + fmt.Printf("sub_int64 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_1_ssa(1); got != 0 { + fmt.Printf("sub_int64 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_int64_ssa(4294967296); got != -4294967295 { + fmt.Printf("sub_int64 1-4294967296 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := sub_int64_1_ssa(4294967296); got != 4294967295 { + fmt.Printf("sub_int64 4294967296-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_1_int64_ssa(9223372036854775806); got != -9223372036854775805 { + fmt.Printf("sub_int64 1-9223372036854775806 = %d, wanted -9223372036854775805\n", got) + failed = true + } + + if got := sub_int64_1_ssa(9223372036854775806); got != 9223372036854775805 { + fmt.Printf("sub_int64 9223372036854775806-1 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := sub_1_int64_ssa(9223372036854775807); got != -9223372036854775806 { + fmt.Printf("sub_int64 1-9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_1_ssa(9223372036854775807); got != 9223372036854775806 { + fmt.Printf("sub_int64 9223372036854775807-1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(-9223372036854775808); got != -9223372032559808512 { + fmt.Printf("sub_int64 4294967296--9223372036854775808 = %d, wanted -9223372032559808512\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(-9223372036854775808); got != 9223372032559808512 { + fmt.Printf("sub_int64 -9223372036854775808-4294967296 = %d, wanted 9223372032559808512\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(-9223372036854775807); got != -9223372032559808513 { + fmt.Printf("sub_int64 4294967296--9223372036854775807 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(-9223372036854775807); got != 9223372032559808513 { + fmt.Printf("sub_int64 -9223372036854775807-4294967296 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(-4294967296); got != 8589934592 { + fmt.Printf("sub_int64 4294967296--4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(-4294967296); got != -8589934592 { + fmt.Printf("sub_int64 -4294967296-4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(-1); got != 4294967297 { + fmt.Printf("sub_int64 4294967296--1 = %d, wanted 4294967297\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(-1); got != -4294967297 { + fmt.Printf("sub_int64 -1-4294967296 = %d, wanted -4294967297\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(0); got != 4294967296 { + fmt.Printf("sub_int64 4294967296-0 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(0); got != -4294967296 { + fmt.Printf("sub_int64 0-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(1); got != 4294967295 { + fmt.Printf("sub_int64 4294967296-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(1); got != -4294967295 { + fmt.Printf("sub_int64 1-4294967296 = %d, wanted -4294967295\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(4294967296); got != 0 { + fmt.Printf("sub_int64 4294967296-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("sub_int64 4294967296-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(9223372036854775806); got != -9223372032559808510 { + fmt.Printf("sub_int64 4294967296-9223372036854775806 = %d, wanted -9223372032559808510\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(9223372036854775806); got != 9223372032559808510 { + fmt.Printf("sub_int64 9223372036854775806-4294967296 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := sub_4294967296_int64_ssa(9223372036854775807); got != -9223372032559808511 { + fmt.Printf("sub_int64 4294967296-9223372036854775807 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := sub_int64_4294967296_ssa(9223372036854775807); got != 9223372032559808511 { + fmt.Printf("sub_int64 9223372036854775807-4294967296 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(-9223372036854775808); got != -2 { + fmt.Printf("sub_int64 9223372036854775806--9223372036854775808 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(-9223372036854775808); got != 2 { + fmt.Printf("sub_int64 -9223372036854775808-9223372036854775806 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(-9223372036854775807); got != -3 { + fmt.Printf("sub_int64 9223372036854775806--9223372036854775807 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(-9223372036854775807); got != 3 { + fmt.Printf("sub_int64 -9223372036854775807-9223372036854775806 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(-4294967296); got != -9223372032559808514 { + fmt.Printf("sub_int64 9223372036854775806--4294967296 = %d, wanted -9223372032559808514\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(-4294967296); got != 9223372032559808514 { + fmt.Printf("sub_int64 -4294967296-9223372036854775806 = %d, wanted 9223372032559808514\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(-1); got != 9223372036854775807 { + fmt.Printf("sub_int64 9223372036854775806--1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(-1); got != -9223372036854775807 { + fmt.Printf("sub_int64 -1-9223372036854775806 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(0); got != 9223372036854775806 { + fmt.Printf("sub_int64 9223372036854775806-0 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(0); got != -9223372036854775806 { + fmt.Printf("sub_int64 0-9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(1); got != 9223372036854775805 { + fmt.Printf("sub_int64 9223372036854775806-1 = %d, wanted 9223372036854775805\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(1); got != -9223372036854775805 { + fmt.Printf("sub_int64 1-9223372036854775806 = %d, wanted -9223372036854775805\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(4294967296); got != 9223372032559808510 { + fmt.Printf("sub_int64 9223372036854775806-4294967296 = %d, wanted 9223372032559808510\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(4294967296); got != -9223372032559808510 { + fmt.Printf("sub_int64 4294967296-9223372036854775806 = %d, wanted -9223372032559808510\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("sub_int64 9223372036854775806-9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(9223372036854775806); got != 0 { + fmt.Printf("sub_int64 9223372036854775806-9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_9223372036854775806_int64_ssa(9223372036854775807); got != -1 { + fmt.Printf("sub_int64 9223372036854775806-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int64_9223372036854775806_ssa(9223372036854775807); got != 1 { + fmt.Printf("sub_int64 9223372036854775807-9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(-9223372036854775808); got != -1 { + fmt.Printf("sub_int64 9223372036854775807--9223372036854775808 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(-9223372036854775808); got != 1 { + fmt.Printf("sub_int64 -9223372036854775808-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(-9223372036854775807); got != -2 { + fmt.Printf("sub_int64 9223372036854775807--9223372036854775807 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(-9223372036854775807); got != 2 { + fmt.Printf("sub_int64 -9223372036854775807-9223372036854775807 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(-4294967296); got != -9223372032559808513 { + fmt.Printf("sub_int64 9223372036854775807--4294967296 = %d, wanted -9223372032559808513\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(-4294967296); got != 9223372032559808513 { + fmt.Printf("sub_int64 -4294967296-9223372036854775807 = %d, wanted 9223372032559808513\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(-1); got != -9223372036854775808 { + fmt.Printf("sub_int64 9223372036854775807--1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(-1); got != -9223372036854775808 { + fmt.Printf("sub_int64 -1-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(0); got != 9223372036854775807 { + fmt.Printf("sub_int64 9223372036854775807-0 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(0); got != -9223372036854775807 { + fmt.Printf("sub_int64 0-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(1); got != 9223372036854775806 { + fmt.Printf("sub_int64 9223372036854775807-1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(1); got != -9223372036854775806 { + fmt.Printf("sub_int64 1-9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(4294967296); got != 9223372032559808511 { + fmt.Printf("sub_int64 9223372036854775807-4294967296 = %d, wanted 9223372032559808511\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(4294967296); got != -9223372032559808511 { + fmt.Printf("sub_int64 4294967296-9223372036854775807 = %d, wanted -9223372032559808511\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(9223372036854775806); got != 1 { + fmt.Printf("sub_int64 9223372036854775807-9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(9223372036854775806); got != -1 { + fmt.Printf("sub_int64 9223372036854775806-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_9223372036854775807_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("sub_int64 9223372036854775807-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int64_9223372036854775807_ssa(9223372036854775807); got != 0 { + fmt.Printf("sub_int64 9223372036854775807-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(-9223372036854775808); got != 1 { + fmt.Printf("div_int64 -9223372036854775808/-9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(-9223372036854775808); got != 1 { + fmt.Printf("div_int64 -9223372036854775808/-9223372036854775808 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(-9223372036854775807); got != 1 { + fmt.Printf("div_int64 -9223372036854775808/-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 -9223372036854775807/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(-4294967296); got != 2147483648 { + fmt.Printf("div_int64 -9223372036854775808/-4294967296 = %d, wanted 2147483648\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 -4294967296/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(-1); got != -9223372036854775808 { + fmt.Printf("div_int64 -9223372036854775808/-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(0); got != 0 { + fmt.Printf("div_int64 0/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(1); got != -9223372036854775808 { + fmt.Printf("div_int64 -9223372036854775808/1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(1); got != 0 { + fmt.Printf("div_int64 1/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(4294967296); got != -2147483648 { + fmt.Printf("div_int64 -9223372036854775808/4294967296 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 4294967296/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(9223372036854775806); got != -1 { + fmt.Printf("div_int64 -9223372036854775808/9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 9223372036854775806/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775808_int64_ssa(9223372036854775807); got != -1 { + fmt.Printf("div_int64 -9223372036854775808/9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775808_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 9223372036854775807/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 -9223372036854775807/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(-9223372036854775808); got != 1 { + fmt.Printf("div_int64 -9223372036854775808/-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(-9223372036854775807); got != 1 { + fmt.Printf("div_int64 -9223372036854775807/-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(-9223372036854775807); got != 1 { + fmt.Printf("div_int64 -9223372036854775807/-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(-4294967296); got != 2147483647 { + fmt.Printf("div_int64 -9223372036854775807/-4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 -4294967296/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(-1); got != 9223372036854775807 { + fmt.Printf("div_int64 -9223372036854775807/-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(0); got != 0 { + fmt.Printf("div_int64 0/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(1); got != -9223372036854775807 { + fmt.Printf("div_int64 -9223372036854775807/1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(1); got != 0 { + fmt.Printf("div_int64 1/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(4294967296); got != -2147483647 { + fmt.Printf("div_int64 -9223372036854775807/4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 4294967296/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(9223372036854775806); got != -1 { + fmt.Printf("div_int64 -9223372036854775807/9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 9223372036854775806/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg9223372036854775807_int64_ssa(9223372036854775807); got != -1 { + fmt.Printf("div_int64 -9223372036854775807/9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg9223372036854775807_ssa(9223372036854775807); got != -1 { + fmt.Printf("div_int64 9223372036854775807/-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 -4294967296/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(-9223372036854775808); got != 2147483648 { + fmt.Printf("div_int64 -9223372036854775808/-4294967296 = %d, wanted 2147483648\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 -4294967296/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(-9223372036854775807); got != 2147483647 { + fmt.Printf("div_int64 -9223372036854775807/-4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(-4294967296); got != 1 { + fmt.Printf("div_int64 -4294967296/-4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(-4294967296); got != 1 { + fmt.Printf("div_int64 -4294967296/-4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(-1); got != 4294967296 { + fmt.Printf("div_int64 -4294967296/-1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(0); got != 0 { + fmt.Printf("div_int64 0/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(1); got != -4294967296 { + fmt.Printf("div_int64 -4294967296/1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(1); got != 0 { + fmt.Printf("div_int64 1/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(4294967296); got != -1 { + fmt.Printf("div_int64 -4294967296/4294967296 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(4294967296); got != -1 { + fmt.Printf("div_int64 4294967296/-4294967296 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 -4294967296/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(9223372036854775806); got != -2147483647 { + fmt.Printf("div_int64 9223372036854775806/-4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_Neg4294967296_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 -4294967296/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg4294967296_ssa(9223372036854775807); got != -2147483647 { + fmt.Printf("div_int64 9223372036854775807/-4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 -1/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("div_int64 -9223372036854775808/-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 -1/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(-9223372036854775807); got != 9223372036854775807 { + fmt.Printf("div_int64 -9223372036854775807/-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 -1/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(-4294967296); got != 4294967296 { + fmt.Printf("div_int64 -4294967296/-1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(-1); got != 1 { + fmt.Printf("div_int64 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(-1); got != 1 { + fmt.Printf("div_int64 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(0); got != 0 { + fmt.Printf("div_int64 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(1); got != -1 { + fmt.Printf("div_int64 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(1); got != -1 { + fmt.Printf("div_int64 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 -1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(4294967296); got != -4294967296 { + fmt.Printf("div_int64 4294967296/-1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 -1/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("div_int64 9223372036854775806/-1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := div_Neg1_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 -1/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_Neg1_ssa(9223372036854775807); got != -9223372036854775807 { + fmt.Printf("div_int64 9223372036854775807/-1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := div_0_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 0/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 0/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 0/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(-1); got != 0 { + fmt.Printf("div_int64 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(1); got != 0 { + fmt.Printf("div_int64 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 0/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 0/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 0/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 1/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("div_int64 -9223372036854775808/1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := div_1_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 1/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("div_int64 -9223372036854775807/1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := div_1_int64_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 1/-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(-4294967296); got != -4294967296 { + fmt.Printf("div_int64 -4294967296/1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := div_1_int64_ssa(-1); got != -1 { + fmt.Printf("div_int64 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_1_ssa(-1); got != -1 { + fmt.Printf("div_int64 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_1_ssa(0); got != 0 { + fmt.Printf("div_int64 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int64_ssa(1); got != 1 { + fmt.Printf("div_int64 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_1_ssa(1); got != 1 { + fmt.Printf("div_int64 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_int64_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(4294967296); got != 4294967296 { + fmt.Printf("div_int64 4294967296/1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_1_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 1/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("div_int64 9223372036854775806/1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := div_1_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 1/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_1_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("div_int64 9223372036854775807/1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 4294967296/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(-9223372036854775808); got != -2147483648 { + fmt.Printf("div_int64 -9223372036854775808/4294967296 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 4294967296/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(-9223372036854775807); got != -2147483647 { + fmt.Printf("div_int64 -9223372036854775807/4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(-4294967296); got != -1 { + fmt.Printf("div_int64 4294967296/-4294967296 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(-4294967296); got != -1 { + fmt.Printf("div_int64 -4294967296/4294967296 = %d, wanted -1\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(-1); got != -4294967296 { + fmt.Printf("div_int64 4294967296/-1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(0); got != 0 { + fmt.Printf("div_int64 0/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(1); got != 4294967296 { + fmt.Printf("div_int64 4294967296/1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(1); got != 0 { + fmt.Printf("div_int64 1/4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(4294967296); got != 1 { + fmt.Printf("div_int64 4294967296/4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(4294967296); got != 1 { + fmt.Printf("div_int64 4294967296/4294967296 = %d, wanted 1\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 4294967296/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(9223372036854775806); got != 2147483647 { + fmt.Printf("div_int64 9223372036854775806/4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_4294967296_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 4294967296/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_4294967296_ssa(9223372036854775807); got != 2147483647 { + fmt.Printf("div_int64 9223372036854775807/4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 9223372036854775806/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(-9223372036854775808); got != -1 { + fmt.Printf("div_int64 -9223372036854775808/9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("div_int64 9223372036854775806/-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(-9223372036854775807); got != -1 { + fmt.Printf("div_int64 -9223372036854775807/9223372036854775806 = %d, wanted -1\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(-4294967296); got != -2147483647 { + fmt.Printf("div_int64 9223372036854775806/-4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 -4294967296/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(-1); got != -9223372036854775806 { + fmt.Printf("div_int64 9223372036854775806/-1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(0); got != 0 { + fmt.Printf("div_int64 0/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(1); got != 9223372036854775806 { + fmt.Printf("div_int64 9223372036854775806/1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(1); got != 0 { + fmt.Printf("div_int64 1/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(4294967296); got != 2147483647 { + fmt.Printf("div_int64 9223372036854775806/4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 4294967296/9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(9223372036854775806); got != 1 { + fmt.Printf("div_int64 9223372036854775806/9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(9223372036854775806); got != 1 { + fmt.Printf("div_int64 9223372036854775806/9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := div_9223372036854775806_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("div_int64 9223372036854775806/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775806_ssa(9223372036854775807); got != 1 { + fmt.Printf("div_int64 9223372036854775807/9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("div_int64 9223372036854775807/-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(-9223372036854775808); got != -1 { + fmt.Printf("div_int64 -9223372036854775808/9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(-9223372036854775807); got != -1 { + fmt.Printf("div_int64 9223372036854775807/-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(-9223372036854775807); got != -1 { + fmt.Printf("div_int64 -9223372036854775807/9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(-4294967296); got != -2147483647 { + fmt.Printf("div_int64 9223372036854775807/-4294967296 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(-4294967296); got != 0 { + fmt.Printf("div_int64 -4294967296/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(-1); got != -9223372036854775807 { + fmt.Printf("div_int64 9223372036854775807/-1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(-1); got != 0 { + fmt.Printf("div_int64 -1/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(0); got != 0 { + fmt.Printf("div_int64 0/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(1); got != 9223372036854775807 { + fmt.Printf("div_int64 9223372036854775807/1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(1); got != 0 { + fmt.Printf("div_int64 1/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(4294967296); got != 2147483647 { + fmt.Printf("div_int64 9223372036854775807/4294967296 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(4294967296); got != 0 { + fmt.Printf("div_int64 4294967296/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(9223372036854775806); got != 1 { + fmt.Printf("div_int64 9223372036854775807/9223372036854775806 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(9223372036854775806); got != 0 { + fmt.Printf("div_int64 9223372036854775806/9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := div_9223372036854775807_int64_ssa(9223372036854775807); got != 1 { + fmt.Printf("div_int64 9223372036854775807/9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int64_9223372036854775807_ssa(9223372036854775807); got != 1 { + fmt.Printf("div_int64 9223372036854775807/9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(-9223372036854775807); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775807*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(-1); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(-1); got != -9223372036854775808 { + fmt.Printf("mul_int64 -1*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(1); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(1); got != -9223372036854775808 { + fmt.Printf("mul_int64 1*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(9223372036854775806); got != 0 { + fmt.Printf("mul_int64 9223372036854775806*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775808_int64_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775808_ssa(9223372036854775807); got != -9223372036854775808 { + fmt.Printf("mul_int64 9223372036854775807*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775807*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*-9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(-9223372036854775807); got != 1 { + fmt.Printf("mul_int64 -9223372036854775807*-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(-9223372036854775807); got != 1 { + fmt.Printf("mul_int64 -9223372036854775807*-9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(-4294967296); got != -4294967296 { + fmt.Printf("mul_int64 -9223372036854775807*-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(-4294967296); got != -4294967296 { + fmt.Printf("mul_int64 -4294967296*-9223372036854775807 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(-1); got != 9223372036854775807 { + fmt.Printf("mul_int64 -9223372036854775807*-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(-1); got != 9223372036854775807 { + fmt.Printf("mul_int64 -1*-9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 -9223372036854775807*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(1); got != -9223372036854775807 { + fmt.Printf("mul_int64 -9223372036854775807*1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(1); got != -9223372036854775807 { + fmt.Printf("mul_int64 1*-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_int64 -9223372036854775807*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_int64 4294967296*-9223372036854775807 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("mul_int64 -9223372036854775807*9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*-9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_Neg9223372036854775807_int64_ssa(9223372036854775807); got != -1 { + fmt.Printf("mul_int64 -9223372036854775807*9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int64_Neg9223372036854775807_ssa(9223372036854775807); got != -1 { + fmt.Printf("mul_int64 9223372036854775807*-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -4294967296*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(-9223372036854775807); got != -4294967296 { + fmt.Printf("mul_int64 -4294967296*-9223372036854775807 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(-9223372036854775807); got != -4294967296 { + fmt.Printf("mul_int64 -9223372036854775807*-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(-1); got != 4294967296 { + fmt.Printf("mul_int64 -4294967296*-1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(-1); got != 4294967296 { + fmt.Printf("mul_int64 -1*-4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 -4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(1); got != -4294967296 { + fmt.Printf("mul_int64 -4294967296*1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(1); got != -4294967296 { + fmt.Printf("mul_int64 1*-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(9223372036854775806); got != 8589934592 { + fmt.Printf("mul_int64 -4294967296*9223372036854775806 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(9223372036854775806); got != 8589934592 { + fmt.Printf("mul_int64 9223372036854775806*-4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := mul_Neg4294967296_int64_ssa(9223372036854775807); got != 4294967296 { + fmt.Printf("mul_int64 -4294967296*9223372036854775807 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg4294967296_ssa(9223372036854775807); got != 4294967296 { + fmt.Printf("mul_int64 9223372036854775807*-4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -1*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*-1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(-9223372036854775807); got != 9223372036854775807 { + fmt.Printf("mul_int64 -1*-9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(-9223372036854775807); got != 9223372036854775807 { + fmt.Printf("mul_int64 -9223372036854775807*-1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(-4294967296); got != 4294967296 { + fmt.Printf("mul_int64 -1*-4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(-4294967296); got != 4294967296 { + fmt.Printf("mul_int64 -4294967296*-1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(-1); got != 1 { + fmt.Printf("mul_int64 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(-1); got != 1 { + fmt.Printf("mul_int64 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(1); got != -1 { + fmt.Printf("mul_int64 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(1); got != -1 { + fmt.Printf("mul_int64 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(4294967296); got != -4294967296 { + fmt.Printf("mul_int64 -1*4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(4294967296); got != -4294967296 { + fmt.Printf("mul_int64 4294967296*-1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("mul_int64 -1*9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*-1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_Neg1_int64_ssa(9223372036854775807); got != -9223372036854775807 { + fmt.Printf("mul_int64 -1*9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_Neg1_ssa(9223372036854775807); got != -9223372036854775807 { + fmt.Printf("mul_int64 9223372036854775807*-1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_0_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 0*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(-9223372036854775807); got != 0 { + fmt.Printf("mul_int64 0*-9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(-9223372036854775807); got != 0 { + fmt.Printf("mul_int64 -9223372036854775807*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 0*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(-1); got != 0 { + fmt.Printf("mul_int64 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(-1); got != 0 { + fmt.Printf("mul_int64 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(1); got != 0 { + fmt.Printf("mul_int64 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(1); got != 0 { + fmt.Printf("mul_int64 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 0*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(9223372036854775806); got != 0 { + fmt.Printf("mul_int64 0*9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(9223372036854775806); got != 0 { + fmt.Printf("mul_int64 9223372036854775806*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int64_ssa(9223372036854775807); got != 0 { + fmt.Printf("mul_int64 0*9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_0_ssa(9223372036854775807); got != 0 { + fmt.Printf("mul_int64 9223372036854775807*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 1*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_1_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*1 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_1_int64_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("mul_int64 1*-9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_1_ssa(-9223372036854775807); got != -9223372036854775807 { + fmt.Printf("mul_int64 -9223372036854775807*1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_1_int64_ssa(-4294967296); got != -4294967296 { + fmt.Printf("mul_int64 1*-4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_1_ssa(-4294967296); got != -4294967296 { + fmt.Printf("mul_int64 -4294967296*1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_1_int64_ssa(-1); got != -1 { + fmt.Printf("mul_int64 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int64_1_ssa(-1); got != -1 { + fmt.Printf("mul_int64 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_1_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_1_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int64_ssa(1); got != 1 { + fmt.Printf("mul_int64 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int64_1_ssa(1); got != 1 { + fmt.Printf("mul_int64 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_int64_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_int64 1*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_1_ssa(4294967296); got != 4294967296 { + fmt.Printf("mul_int64 4294967296*1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_1_int64_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("mul_int64 1*9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_1_ssa(9223372036854775806); got != 9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_1_int64_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("mul_int64 1*9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_1_ssa(9223372036854775807); got != 9223372036854775807 { + fmt.Printf("mul_int64 9223372036854775807*1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 4294967296*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(-9223372036854775807); got != 4294967296 { + fmt.Printf("mul_int64 4294967296*-9223372036854775807 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(-9223372036854775807); got != 4294967296 { + fmt.Printf("mul_int64 -9223372036854775807*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*-4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(-4294967296); got != 0 { + fmt.Printf("mul_int64 -4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(-1); got != -4294967296 { + fmt.Printf("mul_int64 4294967296*-1 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(-1); got != -4294967296 { + fmt.Printf("mul_int64 -1*4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 4294967296*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(1); got != 4294967296 { + fmt.Printf("mul_int64 4294967296*1 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(1); got != 4294967296 { + fmt.Printf("mul_int64 1*4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(4294967296); got != 0 { + fmt.Printf("mul_int64 4294967296*4294967296 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(9223372036854775806); got != -8589934592 { + fmt.Printf("mul_int64 4294967296*9223372036854775806 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(9223372036854775806); got != -8589934592 { + fmt.Printf("mul_int64 9223372036854775806*4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := mul_4294967296_int64_ssa(9223372036854775807); got != -4294967296 { + fmt.Printf("mul_int64 4294967296*9223372036854775807 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_4294967296_ssa(9223372036854775807); got != -4294967296 { + fmt.Printf("mul_int64 9223372036854775807*4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 9223372036854775806*-9223372036854775808 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(-9223372036854775808); got != 0 { + fmt.Printf("mul_int64 -9223372036854775808*9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(-9223372036854775807); got != 9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*-9223372036854775807 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(-9223372036854775807); got != 9223372036854775806 { + fmt.Printf("mul_int64 -9223372036854775807*9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(-4294967296); got != 8589934592 { + fmt.Printf("mul_int64 9223372036854775806*-4294967296 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(-4294967296); got != 8589934592 { + fmt.Printf("mul_int64 -4294967296*9223372036854775806 = %d, wanted 8589934592\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(-1); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*-1 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(-1); got != -9223372036854775806 { + fmt.Printf("mul_int64 -1*9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 9223372036854775806*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*9223372036854775806 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(1); got != 9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*1 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(1); got != 9223372036854775806 { + fmt.Printf("mul_int64 1*9223372036854775806 = %d, wanted 9223372036854775806\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(4294967296); got != -8589934592 { + fmt.Printf("mul_int64 9223372036854775806*4294967296 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(4294967296); got != -8589934592 { + fmt.Printf("mul_int64 4294967296*9223372036854775806 = %d, wanted -8589934592\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(9223372036854775806); got != 4 { + fmt.Printf("mul_int64 9223372036854775806*9223372036854775806 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(9223372036854775806); got != 4 { + fmt.Printf("mul_int64 9223372036854775806*9223372036854775806 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_9223372036854775806_int64_ssa(9223372036854775807); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_9223372036854775806_ssa(9223372036854775807); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775807*9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 9223372036854775807*-9223372036854775808 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(-9223372036854775808); got != -9223372036854775808 { + fmt.Printf("mul_int64 -9223372036854775808*9223372036854775807 = %d, wanted -9223372036854775808\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(-9223372036854775807); got != -1 { + fmt.Printf("mul_int64 9223372036854775807*-9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(-9223372036854775807); got != -1 { + fmt.Printf("mul_int64 -9223372036854775807*9223372036854775807 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(-4294967296); got != 4294967296 { + fmt.Printf("mul_int64 9223372036854775807*-4294967296 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(-4294967296); got != 4294967296 { + fmt.Printf("mul_int64 -4294967296*9223372036854775807 = %d, wanted 4294967296\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(-1); got != -9223372036854775807 { + fmt.Printf("mul_int64 9223372036854775807*-1 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(-1); got != -9223372036854775807 { + fmt.Printf("mul_int64 -1*9223372036854775807 = %d, wanted -9223372036854775807\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(0); got != 0 { + fmt.Printf("mul_int64 9223372036854775807*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(0); got != 0 { + fmt.Printf("mul_int64 0*9223372036854775807 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(1); got != 9223372036854775807 { + fmt.Printf("mul_int64 9223372036854775807*1 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(1); got != 9223372036854775807 { + fmt.Printf("mul_int64 1*9223372036854775807 = %d, wanted 9223372036854775807\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(4294967296); got != -4294967296 { + fmt.Printf("mul_int64 9223372036854775807*4294967296 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(4294967296); got != -4294967296 { + fmt.Printf("mul_int64 4294967296*9223372036854775807 = %d, wanted -4294967296\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775807*9223372036854775806 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(9223372036854775806); got != -9223372036854775806 { + fmt.Printf("mul_int64 9223372036854775806*9223372036854775807 = %d, wanted -9223372036854775806\n", got) + failed = true + } + + if got := mul_9223372036854775807_int64_ssa(9223372036854775807); got != 1 { + fmt.Printf("mul_int64 9223372036854775807*9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int64_9223372036854775807_ssa(9223372036854775807); got != 1 { + fmt.Printf("mul_int64 9223372036854775807*9223372036854775807 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint32_ssa(0); got != 0 { + fmt.Printf("add_uint32 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint32_0_ssa(0); got != 0 { + fmt.Printf("add_uint32 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_uint32_ssa(1); got != 1 { + fmt.Printf("add_uint32 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint32_0_ssa(1); got != 1 { + fmt.Printf("add_uint32 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint32_ssa(4294967295); got != 4294967295 { + fmt.Printf("add_uint32 0+4294967295 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_uint32_0_ssa(4294967295); got != 4294967295 { + fmt.Printf("add_uint32 4294967295+0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_1_uint32_ssa(0); got != 1 { + fmt.Printf("add_uint32 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint32_1_ssa(0); got != 1 { + fmt.Printf("add_uint32 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_uint32_ssa(1); got != 2 { + fmt.Printf("add_uint32 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_uint32_1_ssa(1); got != 2 { + fmt.Printf("add_uint32 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_uint32_ssa(4294967295); got != 0 { + fmt.Printf("add_uint32 1+4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint32_1_ssa(4294967295); got != 0 { + fmt.Printf("add_uint32 4294967295+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_4294967295_uint32_ssa(0); got != 4294967295 { + fmt.Printf("add_uint32 4294967295+0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_uint32_4294967295_ssa(0); got != 4294967295 { + fmt.Printf("add_uint32 0+4294967295 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := add_4294967295_uint32_ssa(1); got != 0 { + fmt.Printf("add_uint32 4294967295+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint32_4294967295_ssa(1); got != 0 { + fmt.Printf("add_uint32 1+4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := add_4294967295_uint32_ssa(4294967295); got != 4294967294 { + fmt.Printf("add_uint32 4294967295+4294967295 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := add_uint32_4294967295_ssa(4294967295); got != 4294967294 { + fmt.Printf("add_uint32 4294967295+4294967295 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := sub_0_uint32_ssa(0); got != 0 { + fmt.Printf("sub_uint32 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint32_0_ssa(0); got != 0 { + fmt.Printf("sub_uint32 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_uint32_ssa(1); got != 4294967295 { + fmt.Printf("sub_uint32 0-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_uint32_0_ssa(1); got != 1 { + fmt.Printf("sub_uint32 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_uint32_ssa(4294967295); got != 1 { + fmt.Printf("sub_uint32 0-4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint32_0_ssa(4294967295); got != 4294967295 { + fmt.Printf("sub_uint32 4294967295-0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_1_uint32_ssa(0); got != 1 { + fmt.Printf("sub_uint32 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint32_1_ssa(0); got != 4294967295 { + fmt.Printf("sub_uint32 0-1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_1_uint32_ssa(1); got != 0 { + fmt.Printf("sub_uint32 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint32_1_ssa(1); got != 0 { + fmt.Printf("sub_uint32 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_uint32_ssa(4294967295); got != 2 { + fmt.Printf("sub_uint32 1-4294967295 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_uint32_1_ssa(4294967295); got != 4294967294 { + fmt.Printf("sub_uint32 4294967295-1 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := sub_4294967295_uint32_ssa(0); got != 4294967295 { + fmt.Printf("sub_uint32 4294967295-0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := sub_uint32_4294967295_ssa(0); got != 1 { + fmt.Printf("sub_uint32 0-4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_4294967295_uint32_ssa(1); got != 4294967294 { + fmt.Printf("sub_uint32 4294967295-1 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := sub_uint32_4294967295_ssa(1); got != 2 { + fmt.Printf("sub_uint32 1-4294967295 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_4294967295_uint32_ssa(4294967295); got != 0 { + fmt.Printf("sub_uint32 4294967295-4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint32_4294967295_ssa(4294967295); got != 0 { + fmt.Printf("sub_uint32 4294967295-4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint32_ssa(1); got != 0 { + fmt.Printf("div_uint32 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint32_ssa(4294967295); got != 0 { + fmt.Printf("div_uint32 0/4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint32_1_ssa(0); got != 0 { + fmt.Printf("div_uint32 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_uint32_ssa(1); got != 1 { + fmt.Printf("div_uint32 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint32_1_ssa(1); got != 1 { + fmt.Printf("div_uint32 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_uint32_ssa(4294967295); got != 0 { + fmt.Printf("div_uint32 1/4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint32_1_ssa(4294967295); got != 4294967295 { + fmt.Printf("div_uint32 4294967295/1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := div_uint32_4294967295_ssa(0); got != 0 { + fmt.Printf("div_uint32 0/4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967295_uint32_ssa(1); got != 4294967295 { + fmt.Printf("div_uint32 4294967295/1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := div_uint32_4294967295_ssa(1); got != 0 { + fmt.Printf("div_uint32 1/4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := div_4294967295_uint32_ssa(4294967295); got != 1 { + fmt.Printf("div_uint32 4294967295/4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint32_4294967295_ssa(4294967295); got != 1 { + fmt.Printf("div_uint32 4294967295/4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_0_uint32_ssa(0); got != 0 { + fmt.Printf("mul_uint32 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint32_0_ssa(0); got != 0 { + fmt.Printf("mul_uint32 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint32_ssa(1); got != 0 { + fmt.Printf("mul_uint32 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint32_0_ssa(1); got != 0 { + fmt.Printf("mul_uint32 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint32_ssa(4294967295); got != 0 { + fmt.Printf("mul_uint32 0*4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint32_0_ssa(4294967295); got != 0 { + fmt.Printf("mul_uint32 4294967295*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint32_ssa(0); got != 0 { + fmt.Printf("mul_uint32 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint32_1_ssa(0); got != 0 { + fmt.Printf("mul_uint32 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint32_ssa(1); got != 1 { + fmt.Printf("mul_uint32 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint32_1_ssa(1); got != 1 { + fmt.Printf("mul_uint32 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_uint32_ssa(4294967295); got != 4294967295 { + fmt.Printf("mul_uint32 1*4294967295 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := mul_uint32_1_ssa(4294967295); got != 4294967295 { + fmt.Printf("mul_uint32 4294967295*1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := mul_4294967295_uint32_ssa(0); got != 0 { + fmt.Printf("mul_uint32 4294967295*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint32_4294967295_ssa(0); got != 0 { + fmt.Printf("mul_uint32 0*4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_4294967295_uint32_ssa(1); got != 4294967295 { + fmt.Printf("mul_uint32 4294967295*1 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := mul_uint32_4294967295_ssa(1); got != 4294967295 { + fmt.Printf("mul_uint32 1*4294967295 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := mul_4294967295_uint32_ssa(4294967295); got != 1 { + fmt.Printf("mul_uint32 4294967295*4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint32_4294967295_ssa(4294967295); got != 1 { + fmt.Printf("mul_uint32 4294967295*4294967295 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint32_ssa(0); got != 0 { + fmt.Printf("lsh_uint32 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint32_0_ssa(0); got != 0 { + fmt.Printf("lsh_uint32 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_0_uint32_ssa(1); got != 0 { + fmt.Printf("lsh_uint32 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint32_0_ssa(1); got != 1 { + fmt.Printf("lsh_uint32 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint32_ssa(4294967295); got != 0 { + fmt.Printf("lsh_uint32 0<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint32_0_ssa(4294967295); got != 4294967295 { + fmt.Printf("lsh_uint32 4294967295<<0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := lsh_1_uint32_ssa(0); got != 1 { + fmt.Printf("lsh_uint32 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_uint32_1_ssa(0); got != 0 { + fmt.Printf("lsh_uint32 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_1_uint32_ssa(1); got != 2 { + fmt.Printf("lsh_uint32 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_uint32_1_ssa(1); got != 2 { + fmt.Printf("lsh_uint32 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_1_uint32_ssa(4294967295); got != 0 { + fmt.Printf("lsh_uint32 1<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint32_1_ssa(4294967295); got != 4294967294 { + fmt.Printf("lsh_uint32 4294967295<<1 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := lsh_4294967295_uint32_ssa(0); got != 4294967295 { + fmt.Printf("lsh_uint32 4294967295<<0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := lsh_uint32_4294967295_ssa(0); got != 0 { + fmt.Printf("lsh_uint32 0<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_4294967295_uint32_ssa(1); got != 4294967294 { + fmt.Printf("lsh_uint32 4294967295<<1 = %d, wanted 4294967294\n", got) + failed = true + } + + if got := lsh_uint32_4294967295_ssa(1); got != 0 { + fmt.Printf("lsh_uint32 1<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_4294967295_uint32_ssa(4294967295); got != 0 { + fmt.Printf("lsh_uint32 4294967295<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint32_4294967295_ssa(4294967295); got != 0 { + fmt.Printf("lsh_uint32 4294967295<<4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint32_ssa(0); got != 0 { + fmt.Printf("rsh_uint32 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_0_ssa(0); got != 0 { + fmt.Printf("rsh_uint32 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint32_ssa(1); got != 0 { + fmt.Printf("rsh_uint32 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_0_ssa(1); got != 1 { + fmt.Printf("rsh_uint32 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_0_uint32_ssa(4294967295); got != 0 { + fmt.Printf("rsh_uint32 0>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_0_ssa(4294967295); got != 4294967295 { + fmt.Printf("rsh_uint32 4294967295>>0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := rsh_1_uint32_ssa(0); got != 1 { + fmt.Printf("rsh_uint32 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_uint32_1_ssa(0); got != 0 { + fmt.Printf("rsh_uint32 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint32_ssa(1); got != 0 { + fmt.Printf("rsh_uint32 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_1_ssa(1); got != 0 { + fmt.Printf("rsh_uint32 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint32_ssa(4294967295); got != 0 { + fmt.Printf("rsh_uint32 1>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_1_ssa(4294967295); got != 2147483647 { + fmt.Printf("rsh_uint32 4294967295>>1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := rsh_4294967295_uint32_ssa(0); got != 4294967295 { + fmt.Printf("rsh_uint32 4294967295>>0 = %d, wanted 4294967295\n", got) + failed = true + } + + if got := rsh_uint32_4294967295_ssa(0); got != 0 { + fmt.Printf("rsh_uint32 0>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_4294967295_uint32_ssa(1); got != 2147483647 { + fmt.Printf("rsh_uint32 4294967295>>1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := rsh_uint32_4294967295_ssa(1); got != 0 { + fmt.Printf("rsh_uint32 1>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_4294967295_uint32_ssa(4294967295); got != 0 { + fmt.Printf("rsh_uint32 4294967295>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint32_4294967295_ssa(4294967295); got != 0 { + fmt.Printf("rsh_uint32 4294967295>>4294967295 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(-2147483648); got != 0 { + fmt.Printf("add_int32 -2147483648+-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(-2147483648); got != 0 { + fmt.Printf("add_int32 -2147483648+-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(-2147483647); got != 1 { + fmt.Printf("add_int32 -2147483648+-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(-2147483647); got != 1 { + fmt.Printf("add_int32 -2147483647+-2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(-1); got != 2147483647 { + fmt.Printf("add_int32 -2147483648+-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(-1); got != 2147483647 { + fmt.Printf("add_int32 -1+-2147483648 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(0); got != -2147483648 { + fmt.Printf("add_int32 -2147483648+0 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(0); got != -2147483648 { + fmt.Printf("add_int32 0+-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(1); got != -2147483647 { + fmt.Printf("add_int32 -2147483648+1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(1); got != -2147483647 { + fmt.Printf("add_int32 1+-2147483648 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_Neg2147483648_int32_ssa(2147483647); got != -1 { + fmt.Printf("add_int32 -2147483648+2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int32_Neg2147483648_ssa(2147483647); got != -1 { + fmt.Printf("add_int32 2147483647+-2147483648 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(-2147483648); got != 1 { + fmt.Printf("add_int32 -2147483647+-2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(-2147483648); got != 1 { + fmt.Printf("add_int32 -2147483648+-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(-2147483647); got != 2 { + fmt.Printf("add_int32 -2147483647+-2147483647 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(-2147483647); got != 2 { + fmt.Printf("add_int32 -2147483647+-2147483647 = %d, wanted 2\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(-1); got != -2147483648 { + fmt.Printf("add_int32 -2147483647+-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(-1); got != -2147483648 { + fmt.Printf("add_int32 -1+-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(0); got != -2147483647 { + fmt.Printf("add_int32 -2147483647+0 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(0); got != -2147483647 { + fmt.Printf("add_int32 0+-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(1); got != -2147483646 { + fmt.Printf("add_int32 -2147483647+1 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(1); got != -2147483646 { + fmt.Printf("add_int32 1+-2147483647 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := add_Neg2147483647_int32_ssa(2147483647); got != 0 { + fmt.Printf("add_int32 -2147483647+2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_Neg2147483647_ssa(2147483647); got != 0 { + fmt.Printf("add_int32 2147483647+-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(-2147483648); got != 2147483647 { + fmt.Printf("add_int32 -1+-2147483648 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(-2147483648); got != 2147483647 { + fmt.Printf("add_int32 -2147483648+-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(-2147483647); got != -2147483648 { + fmt.Printf("add_int32 -1+-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(-2147483647); got != -2147483648 { + fmt.Printf("add_int32 -2147483647+-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(-1); got != -2 { + fmt.Printf("add_int32 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(-1); got != -2 { + fmt.Printf("add_int32 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(0); got != -1 { + fmt.Printf("add_int32 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(0); got != -1 { + fmt.Printf("add_int32 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(1); got != 0 { + fmt.Printf("add_int32 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(1); got != 0 { + fmt.Printf("add_int32 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int32_ssa(2147483647); got != 2147483646 { + fmt.Printf("add_int32 -1+2147483647 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := add_int32_Neg1_ssa(2147483647); got != 2147483646 { + fmt.Printf("add_int32 2147483647+-1 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := add_0_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("add_int32 0+-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_0_ssa(-2147483648); got != -2147483648 { + fmt.Printf("add_int32 -2147483648+0 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_0_int32_ssa(-2147483647); got != -2147483647 { + fmt.Printf("add_int32 0+-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_int32_0_ssa(-2147483647); got != -2147483647 { + fmt.Printf("add_int32 -2147483647+0 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_0_int32_ssa(-1); got != -1 { + fmt.Printf("add_int32 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int32_0_ssa(-1); got != -1 { + fmt.Printf("add_int32 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_0_int32_ssa(0); got != 0 { + fmt.Printf("add_int32 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_0_ssa(0); got != 0 { + fmt.Printf("add_int32 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_int32_ssa(1); got != 1 { + fmt.Printf("add_int32 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int32_0_ssa(1); got != 1 { + fmt.Printf("add_int32 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_int32_ssa(2147483647); got != 2147483647 { + fmt.Printf("add_int32 0+2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_int32_0_ssa(2147483647); got != 2147483647 { + fmt.Printf("add_int32 2147483647+0 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_1_int32_ssa(-2147483648); got != -2147483647 { + fmt.Printf("add_int32 1+-2147483648 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_int32_1_ssa(-2147483648); got != -2147483647 { + fmt.Printf("add_int32 -2147483648+1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := add_1_int32_ssa(-2147483647); got != -2147483646 { + fmt.Printf("add_int32 1+-2147483647 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := add_int32_1_ssa(-2147483647); got != -2147483646 { + fmt.Printf("add_int32 -2147483647+1 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := add_1_int32_ssa(-1); got != 0 { + fmt.Printf("add_int32 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_1_ssa(-1); got != 0 { + fmt.Printf("add_int32 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_1_int32_ssa(0); got != 1 { + fmt.Printf("add_int32 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int32_1_ssa(0); got != 1 { + fmt.Printf("add_int32 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_int32_ssa(1); got != 2 { + fmt.Printf("add_int32 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int32_1_ssa(1); got != 2 { + fmt.Printf("add_int32 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_int32_ssa(2147483647); got != -2147483648 { + fmt.Printf("add_int32 1+2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_1_ssa(2147483647); got != -2147483648 { + fmt.Printf("add_int32 2147483647+1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(-2147483648); got != -1 { + fmt.Printf("add_int32 2147483647+-2147483648 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(-2147483648); got != -1 { + fmt.Printf("add_int32 -2147483648+2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(-2147483647); got != 0 { + fmt.Printf("add_int32 2147483647+-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(-2147483647); got != 0 { + fmt.Printf("add_int32 -2147483647+2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(-1); got != 2147483646 { + fmt.Printf("add_int32 2147483647+-1 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(-1); got != 2147483646 { + fmt.Printf("add_int32 -1+2147483647 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(0); got != 2147483647 { + fmt.Printf("add_int32 2147483647+0 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(0); got != 2147483647 { + fmt.Printf("add_int32 0+2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(1); got != -2147483648 { + fmt.Printf("add_int32 2147483647+1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(1); got != -2147483648 { + fmt.Printf("add_int32 1+2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := add_2147483647_int32_ssa(2147483647); got != -2 { + fmt.Printf("add_int32 2147483647+2147483647 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int32_2147483647_ssa(2147483647); got != -2 { + fmt.Printf("add_int32 2147483647+2147483647 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(-2147483648); got != 0 { + fmt.Printf("sub_int32 -2147483648--2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(-2147483648); got != 0 { + fmt.Printf("sub_int32 -2147483648--2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(-2147483647); got != -1 { + fmt.Printf("sub_int32 -2147483648--2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(-2147483647); got != 1 { + fmt.Printf("sub_int32 -2147483647--2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(-1); got != -2147483647 { + fmt.Printf("sub_int32 -2147483648--1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(-1); got != 2147483647 { + fmt.Printf("sub_int32 -1--2147483648 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(0); got != -2147483648 { + fmt.Printf("sub_int32 -2147483648-0 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(0); got != -2147483648 { + fmt.Printf("sub_int32 0--2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(1); got != 2147483647 { + fmt.Printf("sub_int32 -2147483648-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(1); got != -2147483647 { + fmt.Printf("sub_int32 1--2147483648 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_Neg2147483648_int32_ssa(2147483647); got != 1 { + fmt.Printf("sub_int32 -2147483648-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int32_Neg2147483648_ssa(2147483647); got != -1 { + fmt.Printf("sub_int32 2147483647--2147483648 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(-2147483648); got != 1 { + fmt.Printf("sub_int32 -2147483647--2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(-2147483648); got != -1 { + fmt.Printf("sub_int32 -2147483648--2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(-2147483647); got != 0 { + fmt.Printf("sub_int32 -2147483647--2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(-2147483647); got != 0 { + fmt.Printf("sub_int32 -2147483647--2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(-1); got != -2147483646 { + fmt.Printf("sub_int32 -2147483647--1 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(-1); got != 2147483646 { + fmt.Printf("sub_int32 -1--2147483647 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(0); got != -2147483647 { + fmt.Printf("sub_int32 -2147483647-0 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(0); got != 2147483647 { + fmt.Printf("sub_int32 0--2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(1); got != -2147483648 { + fmt.Printf("sub_int32 -2147483647-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(1); got != -2147483648 { + fmt.Printf("sub_int32 1--2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_Neg2147483647_int32_ssa(2147483647); got != 2 { + fmt.Printf("sub_int32 -2147483647-2147483647 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int32_Neg2147483647_ssa(2147483647); got != -2 { + fmt.Printf("sub_int32 2147483647--2147483647 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(-2147483648); got != 2147483647 { + fmt.Printf("sub_int32 -1--2147483648 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(-2147483648); got != -2147483647 { + fmt.Printf("sub_int32 -2147483648--1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(-2147483647); got != 2147483646 { + fmt.Printf("sub_int32 -1--2147483647 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(-2147483647); got != -2147483646 { + fmt.Printf("sub_int32 -2147483647--1 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(-1); got != 0 { + fmt.Printf("sub_int32 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(-1); got != 0 { + fmt.Printf("sub_int32 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(0); got != -1 { + fmt.Printf("sub_int32 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(0); got != 1 { + fmt.Printf("sub_int32 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(1); got != -2 { + fmt.Printf("sub_int32 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(1); got != 2 { + fmt.Printf("sub_int32 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_Neg1_int32_ssa(2147483647); got != -2147483648 { + fmt.Printf("sub_int32 -1-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_Neg1_ssa(2147483647); got != -2147483648 { + fmt.Printf("sub_int32 2147483647--1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_0_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("sub_int32 0--2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_0_ssa(-2147483648); got != -2147483648 { + fmt.Printf("sub_int32 -2147483648-0 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_0_int32_ssa(-2147483647); got != 2147483647 { + fmt.Printf("sub_int32 0--2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_int32_0_ssa(-2147483647); got != -2147483647 { + fmt.Printf("sub_int32 -2147483647-0 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_0_int32_ssa(-1); got != 1 { + fmt.Printf("sub_int32 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int32_0_ssa(-1); got != -1 { + fmt.Printf("sub_int32 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_0_int32_ssa(0); got != 0 { + fmt.Printf("sub_int32 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_0_ssa(0); got != 0 { + fmt.Printf("sub_int32 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_int32_ssa(1); got != -1 { + fmt.Printf("sub_int32 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int32_0_ssa(1); got != 1 { + fmt.Printf("sub_int32 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_int32_ssa(2147483647); got != -2147483647 { + fmt.Printf("sub_int32 0-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_int32_0_ssa(2147483647); got != 2147483647 { + fmt.Printf("sub_int32 2147483647-0 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_1_int32_ssa(-2147483648); got != -2147483647 { + fmt.Printf("sub_int32 1--2147483648 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_int32_1_ssa(-2147483648); got != 2147483647 { + fmt.Printf("sub_int32 -2147483648-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_1_int32_ssa(-2147483647); got != -2147483648 { + fmt.Printf("sub_int32 1--2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_1_ssa(-2147483647); got != -2147483648 { + fmt.Printf("sub_int32 -2147483647-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_1_int32_ssa(-1); got != 2 { + fmt.Printf("sub_int32 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int32_1_ssa(-1); got != -2 { + fmt.Printf("sub_int32 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_1_int32_ssa(0); got != 1 { + fmt.Printf("sub_int32 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int32_1_ssa(0); got != -1 { + fmt.Printf("sub_int32 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_1_int32_ssa(1); got != 0 { + fmt.Printf("sub_int32 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_1_ssa(1); got != 0 { + fmt.Printf("sub_int32 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_int32_ssa(2147483647); got != -2147483646 { + fmt.Printf("sub_int32 1-2147483647 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := sub_int32_1_ssa(2147483647); got != 2147483646 { + fmt.Printf("sub_int32 2147483647-1 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(-2147483648); got != -1 { + fmt.Printf("sub_int32 2147483647--2147483648 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(-2147483648); got != 1 { + fmt.Printf("sub_int32 -2147483648-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(-2147483647); got != -2 { + fmt.Printf("sub_int32 2147483647--2147483647 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(-2147483647); got != 2 { + fmt.Printf("sub_int32 -2147483647-2147483647 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(-1); got != -2147483648 { + fmt.Printf("sub_int32 2147483647--1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(-1); got != -2147483648 { + fmt.Printf("sub_int32 -1-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(0); got != 2147483647 { + fmt.Printf("sub_int32 2147483647-0 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(0); got != -2147483647 { + fmt.Printf("sub_int32 0-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(1); got != 2147483646 { + fmt.Printf("sub_int32 2147483647-1 = %d, wanted 2147483646\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(1); got != -2147483646 { + fmt.Printf("sub_int32 1-2147483647 = %d, wanted -2147483646\n", got) + failed = true + } + + if got := sub_2147483647_int32_ssa(2147483647); got != 0 { + fmt.Printf("sub_int32 2147483647-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int32_2147483647_ssa(2147483647); got != 0 { + fmt.Printf("sub_int32 2147483647-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483648_int32_ssa(-2147483648); got != 1 { + fmt.Printf("div_int32 -2147483648/-2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(-2147483648); got != 1 { + fmt.Printf("div_int32 -2147483648/-2147483648 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg2147483648_int32_ssa(-2147483647); got != 1 { + fmt.Printf("div_int32 -2147483648/-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(-2147483647); got != 0 { + fmt.Printf("div_int32 -2147483647/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483648_int32_ssa(-1); got != -2147483648 { + fmt.Printf("div_int32 -2147483648/-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(-1); got != 0 { + fmt.Printf("div_int32 -1/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(0); got != 0 { + fmt.Printf("div_int32 0/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483648_int32_ssa(1); got != -2147483648 { + fmt.Printf("div_int32 -2147483648/1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(1); got != 0 { + fmt.Printf("div_int32 1/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483648_int32_ssa(2147483647); got != -1 { + fmt.Printf("div_int32 -2147483648/2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_Neg2147483648_ssa(2147483647); got != 0 { + fmt.Printf("div_int32 2147483647/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483647_int32_ssa(-2147483648); got != 0 { + fmt.Printf("div_int32 -2147483647/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(-2147483648); got != 1 { + fmt.Printf("div_int32 -2147483648/-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg2147483647_int32_ssa(-2147483647); got != 1 { + fmt.Printf("div_int32 -2147483647/-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(-2147483647); got != 1 { + fmt.Printf("div_int32 -2147483647/-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg2147483647_int32_ssa(-1); got != 2147483647 { + fmt.Printf("div_int32 -2147483647/-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(-1); got != 0 { + fmt.Printf("div_int32 -1/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(0); got != 0 { + fmt.Printf("div_int32 0/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483647_int32_ssa(1); got != -2147483647 { + fmt.Printf("div_int32 -2147483647/1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(1); got != 0 { + fmt.Printf("div_int32 1/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg2147483647_int32_ssa(2147483647); got != -1 { + fmt.Printf("div_int32 -2147483647/2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_Neg2147483647_ssa(2147483647); got != -1 { + fmt.Printf("div_int32 2147483647/-2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int32_ssa(-2147483648); got != 0 { + fmt.Printf("div_int32 -1/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(-2147483648); got != -2147483648 { + fmt.Printf("div_int32 -2147483648/-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_Neg1_int32_ssa(-2147483647); got != 0 { + fmt.Printf("div_int32 -1/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(-2147483647); got != 2147483647 { + fmt.Printf("div_int32 -2147483647/-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_Neg1_int32_ssa(-1); got != 1 { + fmt.Printf("div_int32 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(-1); got != 1 { + fmt.Printf("div_int32 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(0); got != 0 { + fmt.Printf("div_int32 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg1_int32_ssa(1); got != -1 { + fmt.Printf("div_int32 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(1); got != -1 { + fmt.Printf("div_int32 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int32_ssa(2147483647); got != 0 { + fmt.Printf("div_int32 -1/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_Neg1_ssa(2147483647); got != -2147483647 { + fmt.Printf("div_int32 2147483647/-1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_0_int32_ssa(-2147483648); got != 0 { + fmt.Printf("div_int32 0/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int32_ssa(-2147483647); got != 0 { + fmt.Printf("div_int32 0/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int32_ssa(-1); got != 0 { + fmt.Printf("div_int32 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int32_ssa(1); got != 0 { + fmt.Printf("div_int32 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int32_ssa(2147483647); got != 0 { + fmt.Printf("div_int32 0/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int32_ssa(-2147483648); got != 0 { + fmt.Printf("div_int32 1/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_1_ssa(-2147483648); got != -2147483648 { + fmt.Printf("div_int32 -2147483648/1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := div_1_int32_ssa(-2147483647); got != 0 { + fmt.Printf("div_int32 1/-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_1_ssa(-2147483647); got != -2147483647 { + fmt.Printf("div_int32 -2147483647/1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_1_int32_ssa(-1); got != -1 { + fmt.Printf("div_int32 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_1_ssa(-1); got != -1 { + fmt.Printf("div_int32 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_1_ssa(0); got != 0 { + fmt.Printf("div_int32 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int32_ssa(1); got != 1 { + fmt.Printf("div_int32 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_1_ssa(1); got != 1 { + fmt.Printf("div_int32 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_int32_ssa(2147483647); got != 0 { + fmt.Printf("div_int32 1/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_1_ssa(2147483647); got != 2147483647 { + fmt.Printf("div_int32 2147483647/1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_2147483647_int32_ssa(-2147483648); got != 0 { + fmt.Printf("div_int32 2147483647/-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(-2147483648); got != -1 { + fmt.Printf("div_int32 -2147483648/2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_2147483647_int32_ssa(-2147483647); got != -1 { + fmt.Printf("div_int32 2147483647/-2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(-2147483647); got != -1 { + fmt.Printf("div_int32 -2147483647/2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := div_2147483647_int32_ssa(-1); got != -2147483647 { + fmt.Printf("div_int32 2147483647/-1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(-1); got != 0 { + fmt.Printf("div_int32 -1/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(0); got != 0 { + fmt.Printf("div_int32 0/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_2147483647_int32_ssa(1); got != 2147483647 { + fmt.Printf("div_int32 2147483647/1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(1); got != 0 { + fmt.Printf("div_int32 1/2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := div_2147483647_int32_ssa(2147483647); got != 1 { + fmt.Printf("div_int32 2147483647/2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int32_2147483647_ssa(2147483647); got != 1 { + fmt.Printf("div_int32 2147483647/2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(-2147483648); got != 0 { + fmt.Printf("mul_int32 -2147483648*-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(-2147483648); got != 0 { + fmt.Printf("mul_int32 -2147483648*-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(-2147483647); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(-2147483647); got != -2147483648 { + fmt.Printf("mul_int32 -2147483647*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(-1); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(-1); got != -2147483648 { + fmt.Printf("mul_int32 -1*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 -2147483648*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(1); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(1); got != -2147483648 { + fmt.Printf("mul_int32 1*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg2147483648_int32_ssa(2147483647); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg2147483648_ssa(2147483647); got != -2147483648 { + fmt.Printf("mul_int32 2147483647*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -2147483647*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*-2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(-2147483647); got != 1 { + fmt.Printf("mul_int32 -2147483647*-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(-2147483647); got != 1 { + fmt.Printf("mul_int32 -2147483647*-2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(-1); got != 2147483647 { + fmt.Printf("mul_int32 -2147483647*-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(-1); got != 2147483647 { + fmt.Printf("mul_int32 -1*-2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 -2147483647*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(1); got != -2147483647 { + fmt.Printf("mul_int32 -2147483647*1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(1); got != -2147483647 { + fmt.Printf("mul_int32 1*-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_Neg2147483647_int32_ssa(2147483647); got != -1 { + fmt.Printf("mul_int32 -2147483647*2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int32_Neg2147483647_ssa(2147483647); got != -1 { + fmt.Printf("mul_int32 2147483647*-2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -1*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*-1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(-2147483647); got != 2147483647 { + fmt.Printf("mul_int32 -1*-2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(-2147483647); got != 2147483647 { + fmt.Printf("mul_int32 -2147483647*-1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(-1); got != 1 { + fmt.Printf("mul_int32 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(-1); got != 1 { + fmt.Printf("mul_int32 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(1); got != -1 { + fmt.Printf("mul_int32 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(1); got != -1 { + fmt.Printf("mul_int32 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int32_ssa(2147483647); got != -2147483647 { + fmt.Printf("mul_int32 -1*2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_int32_Neg1_ssa(2147483647); got != -2147483647 { + fmt.Printf("mul_int32 2147483647*-1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_0_int32_ssa(-2147483648); got != 0 { + fmt.Printf("mul_int32 0*-2147483648 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(-2147483648); got != 0 { + fmt.Printf("mul_int32 -2147483648*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int32_ssa(-2147483647); got != 0 { + fmt.Printf("mul_int32 0*-2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(-2147483647); got != 0 { + fmt.Printf("mul_int32 -2147483647*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int32_ssa(-1); got != 0 { + fmt.Printf("mul_int32 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(-1); got != 0 { + fmt.Printf("mul_int32 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int32_ssa(1); got != 0 { + fmt.Printf("mul_int32 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(1); got != 0 { + fmt.Printf("mul_int32 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int32_ssa(2147483647); got != 0 { + fmt.Printf("mul_int32 0*2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_0_ssa(2147483647); got != 0 { + fmt.Printf("mul_int32 2147483647*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 1*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_1_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*1 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_1_int32_ssa(-2147483647); got != -2147483647 { + fmt.Printf("mul_int32 1*-2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_int32_1_ssa(-2147483647); got != -2147483647 { + fmt.Printf("mul_int32 -2147483647*1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_1_int32_ssa(-1); got != -1 { + fmt.Printf("mul_int32 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int32_1_ssa(-1); got != -1 { + fmt.Printf("mul_int32 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_1_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_1_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int32_ssa(1); got != 1 { + fmt.Printf("mul_int32 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int32_1_ssa(1); got != 1 { + fmt.Printf("mul_int32 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_int32_ssa(2147483647); got != 2147483647 { + fmt.Printf("mul_int32 1*2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_int32_1_ssa(2147483647); got != 2147483647 { + fmt.Printf("mul_int32 2147483647*1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 2147483647*-2147483648 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(-2147483648); got != -2147483648 { + fmt.Printf("mul_int32 -2147483648*2147483647 = %d, wanted -2147483648\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(-2147483647); got != -1 { + fmt.Printf("mul_int32 2147483647*-2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(-2147483647); got != -1 { + fmt.Printf("mul_int32 -2147483647*2147483647 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(-1); got != -2147483647 { + fmt.Printf("mul_int32 2147483647*-1 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(-1); got != -2147483647 { + fmt.Printf("mul_int32 -1*2147483647 = %d, wanted -2147483647\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(0); got != 0 { + fmt.Printf("mul_int32 2147483647*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(0); got != 0 { + fmt.Printf("mul_int32 0*2147483647 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(1); got != 2147483647 { + fmt.Printf("mul_int32 2147483647*1 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(1); got != 2147483647 { + fmt.Printf("mul_int32 1*2147483647 = %d, wanted 2147483647\n", got) + failed = true + } + + if got := mul_2147483647_int32_ssa(2147483647); got != 1 { + fmt.Printf("mul_int32 2147483647*2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int32_2147483647_ssa(2147483647); got != 1 { + fmt.Printf("mul_int32 2147483647*2147483647 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint16_ssa(0); got != 0 { + fmt.Printf("add_uint16 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint16_0_ssa(0); got != 0 { + fmt.Printf("add_uint16 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_uint16_ssa(1); got != 1 { + fmt.Printf("add_uint16 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint16_0_ssa(1); got != 1 { + fmt.Printf("add_uint16 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint16_ssa(65535); got != 65535 { + fmt.Printf("add_uint16 0+65535 = %d, wanted 65535\n", got) + failed = true + } + + if got := add_uint16_0_ssa(65535); got != 65535 { + fmt.Printf("add_uint16 65535+0 = %d, wanted 65535\n", got) + failed = true + } + + if got := add_1_uint16_ssa(0); got != 1 { + fmt.Printf("add_uint16 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint16_1_ssa(0); got != 1 { + fmt.Printf("add_uint16 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_uint16_ssa(1); got != 2 { + fmt.Printf("add_uint16 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_uint16_1_ssa(1); got != 2 { + fmt.Printf("add_uint16 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_uint16_ssa(65535); got != 0 { + fmt.Printf("add_uint16 1+65535 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint16_1_ssa(65535); got != 0 { + fmt.Printf("add_uint16 65535+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_65535_uint16_ssa(0); got != 65535 { + fmt.Printf("add_uint16 65535+0 = %d, wanted 65535\n", got) + failed = true + } + + if got := add_uint16_65535_ssa(0); got != 65535 { + fmt.Printf("add_uint16 0+65535 = %d, wanted 65535\n", got) + failed = true + } + + if got := add_65535_uint16_ssa(1); got != 0 { + fmt.Printf("add_uint16 65535+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint16_65535_ssa(1); got != 0 { + fmt.Printf("add_uint16 1+65535 = %d, wanted 0\n", got) + failed = true + } + + if got := add_65535_uint16_ssa(65535); got != 65534 { + fmt.Printf("add_uint16 65535+65535 = %d, wanted 65534\n", got) + failed = true + } + + if got := add_uint16_65535_ssa(65535); got != 65534 { + fmt.Printf("add_uint16 65535+65535 = %d, wanted 65534\n", got) + failed = true + } + + if got := sub_0_uint16_ssa(0); got != 0 { + fmt.Printf("sub_uint16 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint16_0_ssa(0); got != 0 { + fmt.Printf("sub_uint16 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_uint16_ssa(1); got != 65535 { + fmt.Printf("sub_uint16 0-1 = %d, wanted 65535\n", got) + failed = true + } + + if got := sub_uint16_0_ssa(1); got != 1 { + fmt.Printf("sub_uint16 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_uint16_ssa(65535); got != 1 { + fmt.Printf("sub_uint16 0-65535 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint16_0_ssa(65535); got != 65535 { + fmt.Printf("sub_uint16 65535-0 = %d, wanted 65535\n", got) + failed = true + } + + if got := sub_1_uint16_ssa(0); got != 1 { + fmt.Printf("sub_uint16 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint16_1_ssa(0); got != 65535 { + fmt.Printf("sub_uint16 0-1 = %d, wanted 65535\n", got) + failed = true + } + + if got := sub_1_uint16_ssa(1); got != 0 { + fmt.Printf("sub_uint16 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint16_1_ssa(1); got != 0 { + fmt.Printf("sub_uint16 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_uint16_ssa(65535); got != 2 { + fmt.Printf("sub_uint16 1-65535 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_uint16_1_ssa(65535); got != 65534 { + fmt.Printf("sub_uint16 65535-1 = %d, wanted 65534\n", got) + failed = true + } + + if got := sub_65535_uint16_ssa(0); got != 65535 { + fmt.Printf("sub_uint16 65535-0 = %d, wanted 65535\n", got) + failed = true + } + + if got := sub_uint16_65535_ssa(0); got != 1 { + fmt.Printf("sub_uint16 0-65535 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_65535_uint16_ssa(1); got != 65534 { + fmt.Printf("sub_uint16 65535-1 = %d, wanted 65534\n", got) + failed = true + } + + if got := sub_uint16_65535_ssa(1); got != 2 { + fmt.Printf("sub_uint16 1-65535 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_65535_uint16_ssa(65535); got != 0 { + fmt.Printf("sub_uint16 65535-65535 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint16_65535_ssa(65535); got != 0 { + fmt.Printf("sub_uint16 65535-65535 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint16_ssa(1); got != 0 { + fmt.Printf("div_uint16 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint16_ssa(65535); got != 0 { + fmt.Printf("div_uint16 0/65535 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint16_1_ssa(0); got != 0 { + fmt.Printf("div_uint16 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_uint16_ssa(1); got != 1 { + fmt.Printf("div_uint16 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint16_1_ssa(1); got != 1 { + fmt.Printf("div_uint16 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_uint16_ssa(65535); got != 0 { + fmt.Printf("div_uint16 1/65535 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint16_1_ssa(65535); got != 65535 { + fmt.Printf("div_uint16 65535/1 = %d, wanted 65535\n", got) + failed = true + } + + if got := div_uint16_65535_ssa(0); got != 0 { + fmt.Printf("div_uint16 0/65535 = %d, wanted 0\n", got) + failed = true + } + + if got := div_65535_uint16_ssa(1); got != 65535 { + fmt.Printf("div_uint16 65535/1 = %d, wanted 65535\n", got) + failed = true + } + + if got := div_uint16_65535_ssa(1); got != 0 { + fmt.Printf("div_uint16 1/65535 = %d, wanted 0\n", got) + failed = true + } + + if got := div_65535_uint16_ssa(65535); got != 1 { + fmt.Printf("div_uint16 65535/65535 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint16_65535_ssa(65535); got != 1 { + fmt.Printf("div_uint16 65535/65535 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_0_uint16_ssa(0); got != 0 { + fmt.Printf("mul_uint16 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint16_0_ssa(0); got != 0 { + fmt.Printf("mul_uint16 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint16_ssa(1); got != 0 { + fmt.Printf("mul_uint16 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint16_0_ssa(1); got != 0 { + fmt.Printf("mul_uint16 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint16_ssa(65535); got != 0 { + fmt.Printf("mul_uint16 0*65535 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint16_0_ssa(65535); got != 0 { + fmt.Printf("mul_uint16 65535*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint16_ssa(0); got != 0 { + fmt.Printf("mul_uint16 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint16_1_ssa(0); got != 0 { + fmt.Printf("mul_uint16 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint16_ssa(1); got != 1 { + fmt.Printf("mul_uint16 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint16_1_ssa(1); got != 1 { + fmt.Printf("mul_uint16 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_uint16_ssa(65535); got != 65535 { + fmt.Printf("mul_uint16 1*65535 = %d, wanted 65535\n", got) + failed = true + } + + if got := mul_uint16_1_ssa(65535); got != 65535 { + fmt.Printf("mul_uint16 65535*1 = %d, wanted 65535\n", got) + failed = true + } + + if got := mul_65535_uint16_ssa(0); got != 0 { + fmt.Printf("mul_uint16 65535*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint16_65535_ssa(0); got != 0 { + fmt.Printf("mul_uint16 0*65535 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_65535_uint16_ssa(1); got != 65535 { + fmt.Printf("mul_uint16 65535*1 = %d, wanted 65535\n", got) + failed = true + } + + if got := mul_uint16_65535_ssa(1); got != 65535 { + fmt.Printf("mul_uint16 1*65535 = %d, wanted 65535\n", got) + failed = true + } + + if got := mul_65535_uint16_ssa(65535); got != 1 { + fmt.Printf("mul_uint16 65535*65535 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint16_65535_ssa(65535); got != 1 { + fmt.Printf("mul_uint16 65535*65535 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint16_ssa(0); got != 0 { + fmt.Printf("lsh_uint16 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint16_0_ssa(0); got != 0 { + fmt.Printf("lsh_uint16 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_0_uint16_ssa(1); got != 0 { + fmt.Printf("lsh_uint16 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint16_0_ssa(1); got != 1 { + fmt.Printf("lsh_uint16 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint16_ssa(65535); got != 0 { + fmt.Printf("lsh_uint16 0<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint16_0_ssa(65535); got != 65535 { + fmt.Printf("lsh_uint16 65535<<0 = %d, wanted 65535\n", got) + failed = true + } + + if got := lsh_1_uint16_ssa(0); got != 1 { + fmt.Printf("lsh_uint16 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_uint16_1_ssa(0); got != 0 { + fmt.Printf("lsh_uint16 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_1_uint16_ssa(1); got != 2 { + fmt.Printf("lsh_uint16 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_uint16_1_ssa(1); got != 2 { + fmt.Printf("lsh_uint16 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_1_uint16_ssa(65535); got != 0 { + fmt.Printf("lsh_uint16 1<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint16_1_ssa(65535); got != 65534 { + fmt.Printf("lsh_uint16 65535<<1 = %d, wanted 65534\n", got) + failed = true + } + + if got := lsh_65535_uint16_ssa(0); got != 65535 { + fmt.Printf("lsh_uint16 65535<<0 = %d, wanted 65535\n", got) + failed = true + } + + if got := lsh_uint16_65535_ssa(0); got != 0 { + fmt.Printf("lsh_uint16 0<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_65535_uint16_ssa(1); got != 65534 { + fmt.Printf("lsh_uint16 65535<<1 = %d, wanted 65534\n", got) + failed = true + } + + if got := lsh_uint16_65535_ssa(1); got != 0 { + fmt.Printf("lsh_uint16 1<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_65535_uint16_ssa(65535); got != 0 { + fmt.Printf("lsh_uint16 65535<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint16_65535_ssa(65535); got != 0 { + fmt.Printf("lsh_uint16 65535<<65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint16_ssa(0); got != 0 { + fmt.Printf("rsh_uint16 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_0_ssa(0); got != 0 { + fmt.Printf("rsh_uint16 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint16_ssa(1); got != 0 { + fmt.Printf("rsh_uint16 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_0_ssa(1); got != 1 { + fmt.Printf("rsh_uint16 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_0_uint16_ssa(65535); got != 0 { + fmt.Printf("rsh_uint16 0>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_0_ssa(65535); got != 65535 { + fmt.Printf("rsh_uint16 65535>>0 = %d, wanted 65535\n", got) + failed = true + } + + if got := rsh_1_uint16_ssa(0); got != 1 { + fmt.Printf("rsh_uint16 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_uint16_1_ssa(0); got != 0 { + fmt.Printf("rsh_uint16 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint16_ssa(1); got != 0 { + fmt.Printf("rsh_uint16 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_1_ssa(1); got != 0 { + fmt.Printf("rsh_uint16 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint16_ssa(65535); got != 0 { + fmt.Printf("rsh_uint16 1>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_1_ssa(65535); got != 32767 { + fmt.Printf("rsh_uint16 65535>>1 = %d, wanted 32767\n", got) + failed = true + } + + if got := rsh_65535_uint16_ssa(0); got != 65535 { + fmt.Printf("rsh_uint16 65535>>0 = %d, wanted 65535\n", got) + failed = true + } + + if got := rsh_uint16_65535_ssa(0); got != 0 { + fmt.Printf("rsh_uint16 0>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_65535_uint16_ssa(1); got != 32767 { + fmt.Printf("rsh_uint16 65535>>1 = %d, wanted 32767\n", got) + failed = true + } + + if got := rsh_uint16_65535_ssa(1); got != 0 { + fmt.Printf("rsh_uint16 1>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_65535_uint16_ssa(65535); got != 0 { + fmt.Printf("rsh_uint16 65535>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint16_65535_ssa(65535); got != 0 { + fmt.Printf("rsh_uint16 65535>>65535 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(-32768); got != 0 { + fmt.Printf("add_int16 -32768+-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(-32768); got != 0 { + fmt.Printf("add_int16 -32768+-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(-32767); got != 1 { + fmt.Printf("add_int16 -32768+-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(-32767); got != 1 { + fmt.Printf("add_int16 -32767+-32768 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(-1); got != 32767 { + fmt.Printf("add_int16 -32768+-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(-1); got != 32767 { + fmt.Printf("add_int16 -1+-32768 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(0); got != -32768 { + fmt.Printf("add_int16 -32768+0 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(0); got != -32768 { + fmt.Printf("add_int16 0+-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(1); got != -32767 { + fmt.Printf("add_int16 -32768+1 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(1); got != -32767 { + fmt.Printf("add_int16 1+-32768 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(32766); got != -2 { + fmt.Printf("add_int16 -32768+32766 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(32766); got != -2 { + fmt.Printf("add_int16 32766+-32768 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg32768_int16_ssa(32767); got != -1 { + fmt.Printf("add_int16 -32768+32767 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_Neg32768_ssa(32767); got != -1 { + fmt.Printf("add_int16 32767+-32768 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(-32768); got != 1 { + fmt.Printf("add_int16 -32767+-32768 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(-32768); got != 1 { + fmt.Printf("add_int16 -32768+-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(-32767); got != 2 { + fmt.Printf("add_int16 -32767+-32767 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(-32767); got != 2 { + fmt.Printf("add_int16 -32767+-32767 = %d, wanted 2\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(-1); got != -32768 { + fmt.Printf("add_int16 -32767+-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(-1); got != -32768 { + fmt.Printf("add_int16 -1+-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(0); got != -32767 { + fmt.Printf("add_int16 -32767+0 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(0); got != -32767 { + fmt.Printf("add_int16 0+-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(1); got != -32766 { + fmt.Printf("add_int16 -32767+1 = %d, wanted -32766\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(1); got != -32766 { + fmt.Printf("add_int16 1+-32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(32766); got != -1 { + fmt.Printf("add_int16 -32767+32766 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(32766); got != -1 { + fmt.Printf("add_int16 32766+-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg32767_int16_ssa(32767); got != 0 { + fmt.Printf("add_int16 -32767+32767 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_Neg32767_ssa(32767); got != 0 { + fmt.Printf("add_int16 32767+-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(-32768); got != 32767 { + fmt.Printf("add_int16 -1+-32768 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(-32768); got != 32767 { + fmt.Printf("add_int16 -32768+-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(-32767); got != -32768 { + fmt.Printf("add_int16 -1+-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(-32767); got != -32768 { + fmt.Printf("add_int16 -32767+-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(-1); got != -2 { + fmt.Printf("add_int16 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(-1); got != -2 { + fmt.Printf("add_int16 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(0); got != -1 { + fmt.Printf("add_int16 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(0); got != -1 { + fmt.Printf("add_int16 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(1); got != 0 { + fmt.Printf("add_int16 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(1); got != 0 { + fmt.Printf("add_int16 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(32766); got != 32765 { + fmt.Printf("add_int16 -1+32766 = %d, wanted 32765\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(32766); got != 32765 { + fmt.Printf("add_int16 32766+-1 = %d, wanted 32765\n", got) + failed = true + } + + if got := add_Neg1_int16_ssa(32767); got != 32766 { + fmt.Printf("add_int16 -1+32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_int16_Neg1_ssa(32767); got != 32766 { + fmt.Printf("add_int16 32767+-1 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_0_int16_ssa(-32768); got != -32768 { + fmt.Printf("add_int16 0+-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_0_ssa(-32768); got != -32768 { + fmt.Printf("add_int16 -32768+0 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_0_int16_ssa(-32767); got != -32767 { + fmt.Printf("add_int16 0+-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_int16_0_ssa(-32767); got != -32767 { + fmt.Printf("add_int16 -32767+0 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_0_int16_ssa(-1); got != -1 { + fmt.Printf("add_int16 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_0_ssa(-1); got != -1 { + fmt.Printf("add_int16 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_0_int16_ssa(0); got != 0 { + fmt.Printf("add_int16 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_0_ssa(0); got != 0 { + fmt.Printf("add_int16 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_int16_ssa(1); got != 1 { + fmt.Printf("add_int16 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int16_0_ssa(1); got != 1 { + fmt.Printf("add_int16 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_int16_ssa(32766); got != 32766 { + fmt.Printf("add_int16 0+32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_int16_0_ssa(32766); got != 32766 { + fmt.Printf("add_int16 32766+0 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_0_int16_ssa(32767); got != 32767 { + fmt.Printf("add_int16 0+32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_0_ssa(32767); got != 32767 { + fmt.Printf("add_int16 32767+0 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_1_int16_ssa(-32768); got != -32767 { + fmt.Printf("add_int16 1+-32768 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_int16_1_ssa(-32768); got != -32767 { + fmt.Printf("add_int16 -32768+1 = %d, wanted -32767\n", got) + failed = true + } + + if got := add_1_int16_ssa(-32767); got != -32766 { + fmt.Printf("add_int16 1+-32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := add_int16_1_ssa(-32767); got != -32766 { + fmt.Printf("add_int16 -32767+1 = %d, wanted -32766\n", got) + failed = true + } + + if got := add_1_int16_ssa(-1); got != 0 { + fmt.Printf("add_int16 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_1_ssa(-1); got != 0 { + fmt.Printf("add_int16 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_1_int16_ssa(0); got != 1 { + fmt.Printf("add_int16 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int16_1_ssa(0); got != 1 { + fmt.Printf("add_int16 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_int16_ssa(1); got != 2 { + fmt.Printf("add_int16 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int16_1_ssa(1); got != 2 { + fmt.Printf("add_int16 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_int16_ssa(32766); got != 32767 { + fmt.Printf("add_int16 1+32766 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_1_ssa(32766); got != 32767 { + fmt.Printf("add_int16 32766+1 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_1_int16_ssa(32767); got != -32768 { + fmt.Printf("add_int16 1+32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_1_ssa(32767); got != -32768 { + fmt.Printf("add_int16 32767+1 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_32766_int16_ssa(-32768); got != -2 { + fmt.Printf("add_int16 32766+-32768 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int16_32766_ssa(-32768); got != -2 { + fmt.Printf("add_int16 -32768+32766 = %d, wanted -2\n", got) + failed = true + } + + if got := add_32766_int16_ssa(-32767); got != -1 { + fmt.Printf("add_int16 32766+-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_32766_ssa(-32767); got != -1 { + fmt.Printf("add_int16 -32767+32766 = %d, wanted -1\n", got) + failed = true + } + + if got := add_32766_int16_ssa(-1); got != 32765 { + fmt.Printf("add_int16 32766+-1 = %d, wanted 32765\n", got) + failed = true + } + + if got := add_int16_32766_ssa(-1); got != 32765 { + fmt.Printf("add_int16 -1+32766 = %d, wanted 32765\n", got) + failed = true + } + + if got := add_32766_int16_ssa(0); got != 32766 { + fmt.Printf("add_int16 32766+0 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_int16_32766_ssa(0); got != 32766 { + fmt.Printf("add_int16 0+32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_32766_int16_ssa(1); got != 32767 { + fmt.Printf("add_int16 32766+1 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_32766_ssa(1); got != 32767 { + fmt.Printf("add_int16 1+32766 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_32766_int16_ssa(32766); got != -4 { + fmt.Printf("add_int16 32766+32766 = %d, wanted -4\n", got) + failed = true + } + + if got := add_int16_32766_ssa(32766); got != -4 { + fmt.Printf("add_int16 32766+32766 = %d, wanted -4\n", got) + failed = true + } + + if got := add_32766_int16_ssa(32767); got != -3 { + fmt.Printf("add_int16 32766+32767 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int16_32766_ssa(32767); got != -3 { + fmt.Printf("add_int16 32767+32766 = %d, wanted -3\n", got) + failed = true + } + + if got := add_32767_int16_ssa(-32768); got != -1 { + fmt.Printf("add_int16 32767+-32768 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int16_32767_ssa(-32768); got != -1 { + fmt.Printf("add_int16 -32768+32767 = %d, wanted -1\n", got) + failed = true + } + + if got := add_32767_int16_ssa(-32767); got != 0 { + fmt.Printf("add_int16 32767+-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int16_32767_ssa(-32767); got != 0 { + fmt.Printf("add_int16 -32767+32767 = %d, wanted 0\n", got) + failed = true + } + + if got := add_32767_int16_ssa(-1); got != 32766 { + fmt.Printf("add_int16 32767+-1 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_int16_32767_ssa(-1); got != 32766 { + fmt.Printf("add_int16 -1+32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := add_32767_int16_ssa(0); got != 32767 { + fmt.Printf("add_int16 32767+0 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_int16_32767_ssa(0); got != 32767 { + fmt.Printf("add_int16 0+32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := add_32767_int16_ssa(1); got != -32768 { + fmt.Printf("add_int16 32767+1 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_int16_32767_ssa(1); got != -32768 { + fmt.Printf("add_int16 1+32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := add_32767_int16_ssa(32766); got != -3 { + fmt.Printf("add_int16 32767+32766 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int16_32767_ssa(32766); got != -3 { + fmt.Printf("add_int16 32766+32767 = %d, wanted -3\n", got) + failed = true + } + + if got := add_32767_int16_ssa(32767); got != -2 { + fmt.Printf("add_int16 32767+32767 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int16_32767_ssa(32767); got != -2 { + fmt.Printf("add_int16 32767+32767 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(-32768); got != 0 { + fmt.Printf("sub_int16 -32768--32768 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(-32768); got != 0 { + fmt.Printf("sub_int16 -32768--32768 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(-32767); got != -1 { + fmt.Printf("sub_int16 -32768--32767 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(-32767); got != 1 { + fmt.Printf("sub_int16 -32767--32768 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(-1); got != -32767 { + fmt.Printf("sub_int16 -32768--1 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(-1); got != 32767 { + fmt.Printf("sub_int16 -1--32768 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(0); got != -32768 { + fmt.Printf("sub_int16 -32768-0 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(0); got != -32768 { + fmt.Printf("sub_int16 0--32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(1); got != 32767 { + fmt.Printf("sub_int16 -32768-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(1); got != -32767 { + fmt.Printf("sub_int16 1--32768 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(32766); got != 2 { + fmt.Printf("sub_int16 -32768-32766 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(32766); got != -2 { + fmt.Printf("sub_int16 32766--32768 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg32768_int16_ssa(32767); got != 1 { + fmt.Printf("sub_int16 -32768-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int16_Neg32768_ssa(32767); got != -1 { + fmt.Printf("sub_int16 32767--32768 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(-32768); got != 1 { + fmt.Printf("sub_int16 -32767--32768 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(-32768); got != -1 { + fmt.Printf("sub_int16 -32768--32767 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(-32767); got != 0 { + fmt.Printf("sub_int16 -32767--32767 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(-32767); got != 0 { + fmt.Printf("sub_int16 -32767--32767 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(-1); got != -32766 { + fmt.Printf("sub_int16 -32767--1 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(-1); got != 32766 { + fmt.Printf("sub_int16 -1--32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(0); got != -32767 { + fmt.Printf("sub_int16 -32767-0 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(0); got != 32767 { + fmt.Printf("sub_int16 0--32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(1); got != -32768 { + fmt.Printf("sub_int16 -32767-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(1); got != -32768 { + fmt.Printf("sub_int16 1--32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(32766); got != 3 { + fmt.Printf("sub_int16 -32767-32766 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(32766); got != -3 { + fmt.Printf("sub_int16 32766--32767 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_Neg32767_int16_ssa(32767); got != 2 { + fmt.Printf("sub_int16 -32767-32767 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int16_Neg32767_ssa(32767); got != -2 { + fmt.Printf("sub_int16 32767--32767 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(-32768); got != 32767 { + fmt.Printf("sub_int16 -1--32768 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(-32768); got != -32767 { + fmt.Printf("sub_int16 -32768--1 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(-32767); got != 32766 { + fmt.Printf("sub_int16 -1--32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(-32767); got != -32766 { + fmt.Printf("sub_int16 -32767--1 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(-1); got != 0 { + fmt.Printf("sub_int16 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(-1); got != 0 { + fmt.Printf("sub_int16 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(0); got != -1 { + fmt.Printf("sub_int16 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(0); got != 1 { + fmt.Printf("sub_int16 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(1); got != -2 { + fmt.Printf("sub_int16 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(1); got != 2 { + fmt.Printf("sub_int16 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(32766); got != -32767 { + fmt.Printf("sub_int16 -1-32766 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(32766); got != 32767 { + fmt.Printf("sub_int16 32766--1 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_Neg1_int16_ssa(32767); got != -32768 { + fmt.Printf("sub_int16 -1-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_Neg1_ssa(32767); got != -32768 { + fmt.Printf("sub_int16 32767--1 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_0_int16_ssa(-32768); got != -32768 { + fmt.Printf("sub_int16 0--32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_0_ssa(-32768); got != -32768 { + fmt.Printf("sub_int16 -32768-0 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_0_int16_ssa(-32767); got != 32767 { + fmt.Printf("sub_int16 0--32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_int16_0_ssa(-32767); got != -32767 { + fmt.Printf("sub_int16 -32767-0 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_0_int16_ssa(-1); got != 1 { + fmt.Printf("sub_int16 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int16_0_ssa(-1); got != -1 { + fmt.Printf("sub_int16 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_0_int16_ssa(0); got != 0 { + fmt.Printf("sub_int16 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_0_ssa(0); got != 0 { + fmt.Printf("sub_int16 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_int16_ssa(1); got != -1 { + fmt.Printf("sub_int16 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int16_0_ssa(1); got != 1 { + fmt.Printf("sub_int16 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_int16_ssa(32766); got != -32766 { + fmt.Printf("sub_int16 0-32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_int16_0_ssa(32766); got != 32766 { + fmt.Printf("sub_int16 32766-0 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_0_int16_ssa(32767); got != -32767 { + fmt.Printf("sub_int16 0-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_int16_0_ssa(32767); got != 32767 { + fmt.Printf("sub_int16 32767-0 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_1_int16_ssa(-32768); got != -32767 { + fmt.Printf("sub_int16 1--32768 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_int16_1_ssa(-32768); got != 32767 { + fmt.Printf("sub_int16 -32768-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_1_int16_ssa(-32767); got != -32768 { + fmt.Printf("sub_int16 1--32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_1_ssa(-32767); got != -32768 { + fmt.Printf("sub_int16 -32767-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_1_int16_ssa(-1); got != 2 { + fmt.Printf("sub_int16 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int16_1_ssa(-1); got != -2 { + fmt.Printf("sub_int16 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_1_int16_ssa(0); got != 1 { + fmt.Printf("sub_int16 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int16_1_ssa(0); got != -1 { + fmt.Printf("sub_int16 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_1_int16_ssa(1); got != 0 { + fmt.Printf("sub_int16 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_1_ssa(1); got != 0 { + fmt.Printf("sub_int16 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_int16_ssa(32766); got != -32765 { + fmt.Printf("sub_int16 1-32766 = %d, wanted -32765\n", got) + failed = true + } + + if got := sub_int16_1_ssa(32766); got != 32765 { + fmt.Printf("sub_int16 32766-1 = %d, wanted 32765\n", got) + failed = true + } + + if got := sub_1_int16_ssa(32767); got != -32766 { + fmt.Printf("sub_int16 1-32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_int16_1_ssa(32767); got != 32766 { + fmt.Printf("sub_int16 32767-1 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(-32768); got != -2 { + fmt.Printf("sub_int16 32766--32768 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(-32768); got != 2 { + fmt.Printf("sub_int16 -32768-32766 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(-32767); got != -3 { + fmt.Printf("sub_int16 32766--32767 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(-32767); got != 3 { + fmt.Printf("sub_int16 -32767-32766 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(-1); got != 32767 { + fmt.Printf("sub_int16 32766--1 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(-1); got != -32767 { + fmt.Printf("sub_int16 -1-32766 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(0); got != 32766 { + fmt.Printf("sub_int16 32766-0 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(0); got != -32766 { + fmt.Printf("sub_int16 0-32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(1); got != 32765 { + fmt.Printf("sub_int16 32766-1 = %d, wanted 32765\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(1); got != -32765 { + fmt.Printf("sub_int16 1-32766 = %d, wanted -32765\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(32766); got != 0 { + fmt.Printf("sub_int16 32766-32766 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(32766); got != 0 { + fmt.Printf("sub_int16 32766-32766 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_32766_int16_ssa(32767); got != -1 { + fmt.Printf("sub_int16 32766-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int16_32766_ssa(32767); got != 1 { + fmt.Printf("sub_int16 32767-32766 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(-32768); got != -1 { + fmt.Printf("sub_int16 32767--32768 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(-32768); got != 1 { + fmt.Printf("sub_int16 -32768-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(-32767); got != -2 { + fmt.Printf("sub_int16 32767--32767 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(-32767); got != 2 { + fmt.Printf("sub_int16 -32767-32767 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(-1); got != -32768 { + fmt.Printf("sub_int16 32767--1 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(-1); got != -32768 { + fmt.Printf("sub_int16 -1-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(0); got != 32767 { + fmt.Printf("sub_int16 32767-0 = %d, wanted 32767\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(0); got != -32767 { + fmt.Printf("sub_int16 0-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(1); got != 32766 { + fmt.Printf("sub_int16 32767-1 = %d, wanted 32766\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(1); got != -32766 { + fmt.Printf("sub_int16 1-32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(32766); got != 1 { + fmt.Printf("sub_int16 32767-32766 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(32766); got != -1 { + fmt.Printf("sub_int16 32766-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_32767_int16_ssa(32767); got != 0 { + fmt.Printf("sub_int16 32767-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int16_32767_ssa(32767); got != 0 { + fmt.Printf("sub_int16 32767-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(-32768); got != 1 { + fmt.Printf("div_int16 -32768/-32768 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(-32768); got != 1 { + fmt.Printf("div_int16 -32768/-32768 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(-32767); got != 1 { + fmt.Printf("div_int16 -32768/-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(-32767); got != 0 { + fmt.Printf("div_int16 -32767/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(-1); got != -32768 { + fmt.Printf("div_int16 -32768/-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(-1); got != 0 { + fmt.Printf("div_int16 -1/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(0); got != 0 { + fmt.Printf("div_int16 0/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(1); got != -32768 { + fmt.Printf("div_int16 -32768/1 = %d, wanted -32768\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(1); got != 0 { + fmt.Printf("div_int16 1/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(32766); got != -1 { + fmt.Printf("div_int16 -32768/32766 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(32766); got != 0 { + fmt.Printf("div_int16 32766/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32768_int16_ssa(32767); got != -1 { + fmt.Printf("div_int16 -32768/32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_Neg32768_ssa(32767); got != 0 { + fmt.Printf("div_int16 32767/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 -32767/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(-32768); got != 1 { + fmt.Printf("div_int16 -32768/-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(-32767); got != 1 { + fmt.Printf("div_int16 -32767/-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(-32767); got != 1 { + fmt.Printf("div_int16 -32767/-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(-1); got != 32767 { + fmt.Printf("div_int16 -32767/-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(-1); got != 0 { + fmt.Printf("div_int16 -1/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(0); got != 0 { + fmt.Printf("div_int16 0/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(1); got != -32767 { + fmt.Printf("div_int16 -32767/1 = %d, wanted -32767\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(1); got != 0 { + fmt.Printf("div_int16 1/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(32766); got != -1 { + fmt.Printf("div_int16 -32767/32766 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(32766); got != 0 { + fmt.Printf("div_int16 32766/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg32767_int16_ssa(32767); got != -1 { + fmt.Printf("div_int16 -32767/32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_Neg32767_ssa(32767); got != -1 { + fmt.Printf("div_int16 32767/-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 -1/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(-32768); got != -32768 { + fmt.Printf("div_int16 -32768/-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(-32767); got != 0 { + fmt.Printf("div_int16 -1/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(-32767); got != 32767 { + fmt.Printf("div_int16 -32767/-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(-1); got != 1 { + fmt.Printf("div_int16 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(-1); got != 1 { + fmt.Printf("div_int16 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(0); got != 0 { + fmt.Printf("div_int16 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(1); got != -1 { + fmt.Printf("div_int16 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(1); got != -1 { + fmt.Printf("div_int16 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(32766); got != 0 { + fmt.Printf("div_int16 -1/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(32766); got != -32766 { + fmt.Printf("div_int16 32766/-1 = %d, wanted -32766\n", got) + failed = true + } + + if got := div_Neg1_int16_ssa(32767); got != 0 { + fmt.Printf("div_int16 -1/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_Neg1_ssa(32767); got != -32767 { + fmt.Printf("div_int16 32767/-1 = %d, wanted -32767\n", got) + failed = true + } + + if got := div_0_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 0/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int16_ssa(-32767); got != 0 { + fmt.Printf("div_int16 0/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int16_ssa(-1); got != 0 { + fmt.Printf("div_int16 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int16_ssa(1); got != 0 { + fmt.Printf("div_int16 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int16_ssa(32766); got != 0 { + fmt.Printf("div_int16 0/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int16_ssa(32767); got != 0 { + fmt.Printf("div_int16 0/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 1/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_1_ssa(-32768); got != -32768 { + fmt.Printf("div_int16 -32768/1 = %d, wanted -32768\n", got) + failed = true + } + + if got := div_1_int16_ssa(-32767); got != 0 { + fmt.Printf("div_int16 1/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_1_ssa(-32767); got != -32767 { + fmt.Printf("div_int16 -32767/1 = %d, wanted -32767\n", got) + failed = true + } + + if got := div_1_int16_ssa(-1); got != -1 { + fmt.Printf("div_int16 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_1_ssa(-1); got != -1 { + fmt.Printf("div_int16 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_1_ssa(0); got != 0 { + fmt.Printf("div_int16 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int16_ssa(1); got != 1 { + fmt.Printf("div_int16 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_1_ssa(1); got != 1 { + fmt.Printf("div_int16 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_int16_ssa(32766); got != 0 { + fmt.Printf("div_int16 1/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_1_ssa(32766); got != 32766 { + fmt.Printf("div_int16 32766/1 = %d, wanted 32766\n", got) + failed = true + } + + if got := div_1_int16_ssa(32767); got != 0 { + fmt.Printf("div_int16 1/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_1_ssa(32767); got != 32767 { + fmt.Printf("div_int16 32767/1 = %d, wanted 32767\n", got) + failed = true + } + + if got := div_32766_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 32766/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32766_ssa(-32768); got != -1 { + fmt.Printf("div_int16 -32768/32766 = %d, wanted -1\n", got) + failed = true + } + + if got := div_32766_int16_ssa(-32767); got != 0 { + fmt.Printf("div_int16 32766/-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32766_ssa(-32767); got != -1 { + fmt.Printf("div_int16 -32767/32766 = %d, wanted -1\n", got) + failed = true + } + + if got := div_32766_int16_ssa(-1); got != -32766 { + fmt.Printf("div_int16 32766/-1 = %d, wanted -32766\n", got) + failed = true + } + + if got := div_int16_32766_ssa(-1); got != 0 { + fmt.Printf("div_int16 -1/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32766_ssa(0); got != 0 { + fmt.Printf("div_int16 0/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_32766_int16_ssa(1); got != 32766 { + fmt.Printf("div_int16 32766/1 = %d, wanted 32766\n", got) + failed = true + } + + if got := div_int16_32766_ssa(1); got != 0 { + fmt.Printf("div_int16 1/32766 = %d, wanted 0\n", got) + failed = true + } + + if got := div_32766_int16_ssa(32766); got != 1 { + fmt.Printf("div_int16 32766/32766 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_32766_ssa(32766); got != 1 { + fmt.Printf("div_int16 32766/32766 = %d, wanted 1\n", got) + failed = true + } + + if got := div_32766_int16_ssa(32767); got != 0 { + fmt.Printf("div_int16 32766/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32766_ssa(32767); got != 1 { + fmt.Printf("div_int16 32767/32766 = %d, wanted 1\n", got) + failed = true + } + + if got := div_32767_int16_ssa(-32768); got != 0 { + fmt.Printf("div_int16 32767/-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32767_ssa(-32768); got != -1 { + fmt.Printf("div_int16 -32768/32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_32767_int16_ssa(-32767); got != -1 { + fmt.Printf("div_int16 32767/-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int16_32767_ssa(-32767); got != -1 { + fmt.Printf("div_int16 -32767/32767 = %d, wanted -1\n", got) + failed = true + } + + if got := div_32767_int16_ssa(-1); got != -32767 { + fmt.Printf("div_int16 32767/-1 = %d, wanted -32767\n", got) + failed = true + } + + if got := div_int16_32767_ssa(-1); got != 0 { + fmt.Printf("div_int16 -1/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int16_32767_ssa(0); got != 0 { + fmt.Printf("div_int16 0/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_32767_int16_ssa(1); got != 32767 { + fmt.Printf("div_int16 32767/1 = %d, wanted 32767\n", got) + failed = true + } + + if got := div_int16_32767_ssa(1); got != 0 { + fmt.Printf("div_int16 1/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_32767_int16_ssa(32766); got != 1 { + fmt.Printf("div_int16 32767/32766 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_32767_ssa(32766); got != 0 { + fmt.Printf("div_int16 32766/32767 = %d, wanted 0\n", got) + failed = true + } + + if got := div_32767_int16_ssa(32767); got != 1 { + fmt.Printf("div_int16 32767/32767 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int16_32767_ssa(32767); got != 1 { + fmt.Printf("div_int16 32767/32767 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 -32768*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 -32768*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(-32767); got != -32768 { + fmt.Printf("mul_int16 -32768*-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(-32767); got != -32768 { + fmt.Printf("mul_int16 -32767*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(-1); got != -32768 { + fmt.Printf("mul_int16 -32768*-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(-1); got != -32768 { + fmt.Printf("mul_int16 -1*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 -32768*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(1); got != -32768 { + fmt.Printf("mul_int16 -32768*1 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(1); got != -32768 { + fmt.Printf("mul_int16 1*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(32766); got != 0 { + fmt.Printf("mul_int16 -32768*32766 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(32766); got != 0 { + fmt.Printf("mul_int16 32766*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg32768_int16_ssa(32767); got != -32768 { + fmt.Printf("mul_int16 -32768*32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg32768_ssa(32767); got != -32768 { + fmt.Printf("mul_int16 32767*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -32767*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -32768*-32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(-32767); got != 1 { + fmt.Printf("mul_int16 -32767*-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(-32767); got != 1 { + fmt.Printf("mul_int16 -32767*-32767 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(-1); got != 32767 { + fmt.Printf("mul_int16 -32767*-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(-1); got != 32767 { + fmt.Printf("mul_int16 -1*-32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 -32767*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(1); got != -32767 { + fmt.Printf("mul_int16 -32767*1 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(1); got != -32767 { + fmt.Printf("mul_int16 1*-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(32766); got != 32766 { + fmt.Printf("mul_int16 -32767*32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(32766); got != 32766 { + fmt.Printf("mul_int16 32766*-32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_Neg32767_int16_ssa(32767); got != -1 { + fmt.Printf("mul_int16 -32767*32767 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int16_Neg32767_ssa(32767); got != -1 { + fmt.Printf("mul_int16 32767*-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -1*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -32768*-1 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(-32767); got != 32767 { + fmt.Printf("mul_int16 -1*-32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(-32767); got != 32767 { + fmt.Printf("mul_int16 -32767*-1 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(-1); got != 1 { + fmt.Printf("mul_int16 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(-1); got != 1 { + fmt.Printf("mul_int16 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(1); got != -1 { + fmt.Printf("mul_int16 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(1); got != -1 { + fmt.Printf("mul_int16 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(32766); got != -32766 { + fmt.Printf("mul_int16 -1*32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(32766); got != -32766 { + fmt.Printf("mul_int16 32766*-1 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_Neg1_int16_ssa(32767); got != -32767 { + fmt.Printf("mul_int16 -1*32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_int16_Neg1_ssa(32767); got != -32767 { + fmt.Printf("mul_int16 32767*-1 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_0_int16_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 0*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 -32768*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(-32767); got != 0 { + fmt.Printf("mul_int16 0*-32767 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(-32767); got != 0 { + fmt.Printf("mul_int16 -32767*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(-1); got != 0 { + fmt.Printf("mul_int16 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(-1); got != 0 { + fmt.Printf("mul_int16 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(1); got != 0 { + fmt.Printf("mul_int16 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(1); got != 0 { + fmt.Printf("mul_int16 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(32766); got != 0 { + fmt.Printf("mul_int16 0*32766 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(32766); got != 0 { + fmt.Printf("mul_int16 32766*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int16_ssa(32767); got != 0 { + fmt.Printf("mul_int16 0*32767 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_0_ssa(32767); got != 0 { + fmt.Printf("mul_int16 32767*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int16_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 1*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_1_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -32768*1 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_1_int16_ssa(-32767); got != -32767 { + fmt.Printf("mul_int16 1*-32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_int16_1_ssa(-32767); got != -32767 { + fmt.Printf("mul_int16 -32767*1 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_1_int16_ssa(-1); got != -1 { + fmt.Printf("mul_int16 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int16_1_ssa(-1); got != -1 { + fmt.Printf("mul_int16 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_1_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_1_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int16_ssa(1); got != 1 { + fmt.Printf("mul_int16 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int16_1_ssa(1); got != 1 { + fmt.Printf("mul_int16 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_int16_ssa(32766); got != 32766 { + fmt.Printf("mul_int16 1*32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_int16_1_ssa(32766); got != 32766 { + fmt.Printf("mul_int16 32766*1 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_1_int16_ssa(32767); got != 32767 { + fmt.Printf("mul_int16 1*32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_int16_1_ssa(32767); got != 32767 { + fmt.Printf("mul_int16 32767*1 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 32766*-32768 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(-32768); got != 0 { + fmt.Printf("mul_int16 -32768*32766 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(-32767); got != 32766 { + fmt.Printf("mul_int16 32766*-32767 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(-32767); got != 32766 { + fmt.Printf("mul_int16 -32767*32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(-1); got != -32766 { + fmt.Printf("mul_int16 32766*-1 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(-1); got != -32766 { + fmt.Printf("mul_int16 -1*32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 32766*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*32766 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(1); got != 32766 { + fmt.Printf("mul_int16 32766*1 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(1); got != 32766 { + fmt.Printf("mul_int16 1*32766 = %d, wanted 32766\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(32766); got != 4 { + fmt.Printf("mul_int16 32766*32766 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(32766); got != 4 { + fmt.Printf("mul_int16 32766*32766 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_32766_int16_ssa(32767); got != -32766 { + fmt.Printf("mul_int16 32766*32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_int16_32766_ssa(32767); got != -32766 { + fmt.Printf("mul_int16 32767*32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 32767*-32768 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(-32768); got != -32768 { + fmt.Printf("mul_int16 -32768*32767 = %d, wanted -32768\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(-32767); got != -1 { + fmt.Printf("mul_int16 32767*-32767 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(-32767); got != -1 { + fmt.Printf("mul_int16 -32767*32767 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(-1); got != -32767 { + fmt.Printf("mul_int16 32767*-1 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(-1); got != -32767 { + fmt.Printf("mul_int16 -1*32767 = %d, wanted -32767\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(0); got != 0 { + fmt.Printf("mul_int16 32767*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(0); got != 0 { + fmt.Printf("mul_int16 0*32767 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(1); got != 32767 { + fmt.Printf("mul_int16 32767*1 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(1); got != 32767 { + fmt.Printf("mul_int16 1*32767 = %d, wanted 32767\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(32766); got != -32766 { + fmt.Printf("mul_int16 32767*32766 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(32766); got != -32766 { + fmt.Printf("mul_int16 32766*32767 = %d, wanted -32766\n", got) + failed = true + } + + if got := mul_32767_int16_ssa(32767); got != 1 { + fmt.Printf("mul_int16 32767*32767 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int16_32767_ssa(32767); got != 1 { + fmt.Printf("mul_int16 32767*32767 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint8_ssa(0); got != 0 { + fmt.Printf("add_uint8 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint8_0_ssa(0); got != 0 { + fmt.Printf("add_uint8 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_uint8_ssa(1); got != 1 { + fmt.Printf("add_uint8 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint8_0_ssa(1); got != 1 { + fmt.Printf("add_uint8 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_uint8_ssa(255); got != 255 { + fmt.Printf("add_uint8 0+255 = %d, wanted 255\n", got) + failed = true + } + + if got := add_uint8_0_ssa(255); got != 255 { + fmt.Printf("add_uint8 255+0 = %d, wanted 255\n", got) + failed = true + } + + if got := add_1_uint8_ssa(0); got != 1 { + fmt.Printf("add_uint8 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_uint8_1_ssa(0); got != 1 { + fmt.Printf("add_uint8 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_uint8_ssa(1); got != 2 { + fmt.Printf("add_uint8 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_uint8_1_ssa(1); got != 2 { + fmt.Printf("add_uint8 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_uint8_ssa(255); got != 0 { + fmt.Printf("add_uint8 1+255 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint8_1_ssa(255); got != 0 { + fmt.Printf("add_uint8 255+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_255_uint8_ssa(0); got != 255 { + fmt.Printf("add_uint8 255+0 = %d, wanted 255\n", got) + failed = true + } + + if got := add_uint8_255_ssa(0); got != 255 { + fmt.Printf("add_uint8 0+255 = %d, wanted 255\n", got) + failed = true + } + + if got := add_255_uint8_ssa(1); got != 0 { + fmt.Printf("add_uint8 255+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_uint8_255_ssa(1); got != 0 { + fmt.Printf("add_uint8 1+255 = %d, wanted 0\n", got) + failed = true + } + + if got := add_255_uint8_ssa(255); got != 254 { + fmt.Printf("add_uint8 255+255 = %d, wanted 254\n", got) + failed = true + } + + if got := add_uint8_255_ssa(255); got != 254 { + fmt.Printf("add_uint8 255+255 = %d, wanted 254\n", got) + failed = true + } + + if got := sub_0_uint8_ssa(0); got != 0 { + fmt.Printf("sub_uint8 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint8_0_ssa(0); got != 0 { + fmt.Printf("sub_uint8 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_uint8_ssa(1); got != 255 { + fmt.Printf("sub_uint8 0-1 = %d, wanted 255\n", got) + failed = true + } + + if got := sub_uint8_0_ssa(1); got != 1 { + fmt.Printf("sub_uint8 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_uint8_ssa(255); got != 1 { + fmt.Printf("sub_uint8 0-255 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint8_0_ssa(255); got != 255 { + fmt.Printf("sub_uint8 255-0 = %d, wanted 255\n", got) + failed = true + } + + if got := sub_1_uint8_ssa(0); got != 1 { + fmt.Printf("sub_uint8 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_uint8_1_ssa(0); got != 255 { + fmt.Printf("sub_uint8 0-1 = %d, wanted 255\n", got) + failed = true + } + + if got := sub_1_uint8_ssa(1); got != 0 { + fmt.Printf("sub_uint8 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint8_1_ssa(1); got != 0 { + fmt.Printf("sub_uint8 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_uint8_ssa(255); got != 2 { + fmt.Printf("sub_uint8 1-255 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_uint8_1_ssa(255); got != 254 { + fmt.Printf("sub_uint8 255-1 = %d, wanted 254\n", got) + failed = true + } + + if got := sub_255_uint8_ssa(0); got != 255 { + fmt.Printf("sub_uint8 255-0 = %d, wanted 255\n", got) + failed = true + } + + if got := sub_uint8_255_ssa(0); got != 1 { + fmt.Printf("sub_uint8 0-255 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_255_uint8_ssa(1); got != 254 { + fmt.Printf("sub_uint8 255-1 = %d, wanted 254\n", got) + failed = true + } + + if got := sub_uint8_255_ssa(1); got != 2 { + fmt.Printf("sub_uint8 1-255 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_255_uint8_ssa(255); got != 0 { + fmt.Printf("sub_uint8 255-255 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_uint8_255_ssa(255); got != 0 { + fmt.Printf("sub_uint8 255-255 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint8_ssa(1); got != 0 { + fmt.Printf("div_uint8 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_uint8_ssa(255); got != 0 { + fmt.Printf("div_uint8 0/255 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint8_1_ssa(0); got != 0 { + fmt.Printf("div_uint8 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_uint8_ssa(1); got != 1 { + fmt.Printf("div_uint8 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint8_1_ssa(1); got != 1 { + fmt.Printf("div_uint8 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_uint8_ssa(255); got != 0 { + fmt.Printf("div_uint8 1/255 = %d, wanted 0\n", got) + failed = true + } + + if got := div_uint8_1_ssa(255); got != 255 { + fmt.Printf("div_uint8 255/1 = %d, wanted 255\n", got) + failed = true + } + + if got := div_uint8_255_ssa(0); got != 0 { + fmt.Printf("div_uint8 0/255 = %d, wanted 0\n", got) + failed = true + } + + if got := div_255_uint8_ssa(1); got != 255 { + fmt.Printf("div_uint8 255/1 = %d, wanted 255\n", got) + failed = true + } + + if got := div_uint8_255_ssa(1); got != 0 { + fmt.Printf("div_uint8 1/255 = %d, wanted 0\n", got) + failed = true + } + + if got := div_255_uint8_ssa(255); got != 1 { + fmt.Printf("div_uint8 255/255 = %d, wanted 1\n", got) + failed = true + } + + if got := div_uint8_255_ssa(255); got != 1 { + fmt.Printf("div_uint8 255/255 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_0_uint8_ssa(0); got != 0 { + fmt.Printf("mul_uint8 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint8_0_ssa(0); got != 0 { + fmt.Printf("mul_uint8 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint8_ssa(1); got != 0 { + fmt.Printf("mul_uint8 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint8_0_ssa(1); got != 0 { + fmt.Printf("mul_uint8 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_uint8_ssa(255); got != 0 { + fmt.Printf("mul_uint8 0*255 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint8_0_ssa(255); got != 0 { + fmt.Printf("mul_uint8 255*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint8_ssa(0); got != 0 { + fmt.Printf("mul_uint8 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint8_1_ssa(0); got != 0 { + fmt.Printf("mul_uint8 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_uint8_ssa(1); got != 1 { + fmt.Printf("mul_uint8 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint8_1_ssa(1); got != 1 { + fmt.Printf("mul_uint8 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_uint8_ssa(255); got != 255 { + fmt.Printf("mul_uint8 1*255 = %d, wanted 255\n", got) + failed = true + } + + if got := mul_uint8_1_ssa(255); got != 255 { + fmt.Printf("mul_uint8 255*1 = %d, wanted 255\n", got) + failed = true + } + + if got := mul_255_uint8_ssa(0); got != 0 { + fmt.Printf("mul_uint8 255*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_uint8_255_ssa(0); got != 0 { + fmt.Printf("mul_uint8 0*255 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_255_uint8_ssa(1); got != 255 { + fmt.Printf("mul_uint8 255*1 = %d, wanted 255\n", got) + failed = true + } + + if got := mul_uint8_255_ssa(1); got != 255 { + fmt.Printf("mul_uint8 1*255 = %d, wanted 255\n", got) + failed = true + } + + if got := mul_255_uint8_ssa(255); got != 1 { + fmt.Printf("mul_uint8 255*255 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_uint8_255_ssa(255); got != 1 { + fmt.Printf("mul_uint8 255*255 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint8_ssa(0); got != 0 { + fmt.Printf("lsh_uint8 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint8_0_ssa(0); got != 0 { + fmt.Printf("lsh_uint8 0<<0 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_0_uint8_ssa(1); got != 0 { + fmt.Printf("lsh_uint8 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint8_0_ssa(1); got != 1 { + fmt.Printf("lsh_uint8 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_0_uint8_ssa(255); got != 0 { + fmt.Printf("lsh_uint8 0<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint8_0_ssa(255); got != 255 { + fmt.Printf("lsh_uint8 255<<0 = %d, wanted 255\n", got) + failed = true + } + + if got := lsh_1_uint8_ssa(0); got != 1 { + fmt.Printf("lsh_uint8 1<<0 = %d, wanted 1\n", got) + failed = true + } + + if got := lsh_uint8_1_ssa(0); got != 0 { + fmt.Printf("lsh_uint8 0<<1 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_1_uint8_ssa(1); got != 2 { + fmt.Printf("lsh_uint8 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_uint8_1_ssa(1); got != 2 { + fmt.Printf("lsh_uint8 1<<1 = %d, wanted 2\n", got) + failed = true + } + + if got := lsh_1_uint8_ssa(255); got != 0 { + fmt.Printf("lsh_uint8 1<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint8_1_ssa(255); got != 254 { + fmt.Printf("lsh_uint8 255<<1 = %d, wanted 254\n", got) + failed = true + } + + if got := lsh_255_uint8_ssa(0); got != 255 { + fmt.Printf("lsh_uint8 255<<0 = %d, wanted 255\n", got) + failed = true + } + + if got := lsh_uint8_255_ssa(0); got != 0 { + fmt.Printf("lsh_uint8 0<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_255_uint8_ssa(1); got != 254 { + fmt.Printf("lsh_uint8 255<<1 = %d, wanted 254\n", got) + failed = true + } + + if got := lsh_uint8_255_ssa(1); got != 0 { + fmt.Printf("lsh_uint8 1<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_255_uint8_ssa(255); got != 0 { + fmt.Printf("lsh_uint8 255<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := lsh_uint8_255_ssa(255); got != 0 { + fmt.Printf("lsh_uint8 255<<255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint8_ssa(0); got != 0 { + fmt.Printf("rsh_uint8 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_0_ssa(0); got != 0 { + fmt.Printf("rsh_uint8 0>>0 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_0_uint8_ssa(1); got != 0 { + fmt.Printf("rsh_uint8 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_0_ssa(1); got != 1 { + fmt.Printf("rsh_uint8 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_0_uint8_ssa(255); got != 0 { + fmt.Printf("rsh_uint8 0>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_0_ssa(255); got != 255 { + fmt.Printf("rsh_uint8 255>>0 = %d, wanted 255\n", got) + failed = true + } + + if got := rsh_1_uint8_ssa(0); got != 1 { + fmt.Printf("rsh_uint8 1>>0 = %d, wanted 1\n", got) + failed = true + } + + if got := rsh_uint8_1_ssa(0); got != 0 { + fmt.Printf("rsh_uint8 0>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint8_ssa(1); got != 0 { + fmt.Printf("rsh_uint8 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_1_ssa(1); got != 0 { + fmt.Printf("rsh_uint8 1>>1 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_1_uint8_ssa(255); got != 0 { + fmt.Printf("rsh_uint8 1>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_1_ssa(255); got != 127 { + fmt.Printf("rsh_uint8 255>>1 = %d, wanted 127\n", got) + failed = true + } + + if got := rsh_255_uint8_ssa(0); got != 255 { + fmt.Printf("rsh_uint8 255>>0 = %d, wanted 255\n", got) + failed = true + } + + if got := rsh_uint8_255_ssa(0); got != 0 { + fmt.Printf("rsh_uint8 0>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_255_uint8_ssa(1); got != 127 { + fmt.Printf("rsh_uint8 255>>1 = %d, wanted 127\n", got) + failed = true + } + + if got := rsh_uint8_255_ssa(1); got != 0 { + fmt.Printf("rsh_uint8 1>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_255_uint8_ssa(255); got != 0 { + fmt.Printf("rsh_uint8 255>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := rsh_uint8_255_ssa(255); got != 0 { + fmt.Printf("rsh_uint8 255>>255 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(-128); got != 0 { + fmt.Printf("add_int8 -128+-128 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(-128); got != 0 { + fmt.Printf("add_int8 -128+-128 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(-127); got != 1 { + fmt.Printf("add_int8 -128+-127 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(-127); got != 1 { + fmt.Printf("add_int8 -127+-128 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(-1); got != 127 { + fmt.Printf("add_int8 -128+-1 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(-1); got != 127 { + fmt.Printf("add_int8 -1+-128 = %d, wanted 127\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(0); got != -128 { + fmt.Printf("add_int8 -128+0 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(0); got != -128 { + fmt.Printf("add_int8 0+-128 = %d, wanted -128\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(1); got != -127 { + fmt.Printf("add_int8 -128+1 = %d, wanted -127\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(1); got != -127 { + fmt.Printf("add_int8 1+-128 = %d, wanted -127\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(126); got != -2 { + fmt.Printf("add_int8 -128+126 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(126); got != -2 { + fmt.Printf("add_int8 126+-128 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg128_int8_ssa(127); got != -1 { + fmt.Printf("add_int8 -128+127 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_Neg128_ssa(127); got != -1 { + fmt.Printf("add_int8 127+-128 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(-128); got != 1 { + fmt.Printf("add_int8 -127+-128 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(-128); got != 1 { + fmt.Printf("add_int8 -128+-127 = %d, wanted 1\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(-127); got != 2 { + fmt.Printf("add_int8 -127+-127 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(-127); got != 2 { + fmt.Printf("add_int8 -127+-127 = %d, wanted 2\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(-1); got != -128 { + fmt.Printf("add_int8 -127+-1 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(-1); got != -128 { + fmt.Printf("add_int8 -1+-127 = %d, wanted -128\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(0); got != -127 { + fmt.Printf("add_int8 -127+0 = %d, wanted -127\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(0); got != -127 { + fmt.Printf("add_int8 0+-127 = %d, wanted -127\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(1); got != -126 { + fmt.Printf("add_int8 -127+1 = %d, wanted -126\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(1); got != -126 { + fmt.Printf("add_int8 1+-127 = %d, wanted -126\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(126); got != -1 { + fmt.Printf("add_int8 -127+126 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(126); got != -1 { + fmt.Printf("add_int8 126+-127 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg127_int8_ssa(127); got != 0 { + fmt.Printf("add_int8 -127+127 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_Neg127_ssa(127); got != 0 { + fmt.Printf("add_int8 127+-127 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(-128); got != 127 { + fmt.Printf("add_int8 -1+-128 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(-128); got != 127 { + fmt.Printf("add_int8 -128+-1 = %d, wanted 127\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(-127); got != -128 { + fmt.Printf("add_int8 -1+-127 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(-127); got != -128 { + fmt.Printf("add_int8 -127+-1 = %d, wanted -128\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(-1); got != -2 { + fmt.Printf("add_int8 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(-1); got != -2 { + fmt.Printf("add_int8 -1+-1 = %d, wanted -2\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(0); got != -1 { + fmt.Printf("add_int8 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(0); got != -1 { + fmt.Printf("add_int8 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(1); got != 0 { + fmt.Printf("add_int8 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(1); got != 0 { + fmt.Printf("add_int8 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(126); got != 125 { + fmt.Printf("add_int8 -1+126 = %d, wanted 125\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(126); got != 125 { + fmt.Printf("add_int8 126+-1 = %d, wanted 125\n", got) + failed = true + } + + if got := add_Neg1_int8_ssa(127); got != 126 { + fmt.Printf("add_int8 -1+127 = %d, wanted 126\n", got) + failed = true + } + + if got := add_int8_Neg1_ssa(127); got != 126 { + fmt.Printf("add_int8 127+-1 = %d, wanted 126\n", got) + failed = true + } + + if got := add_0_int8_ssa(-128); got != -128 { + fmt.Printf("add_int8 0+-128 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_0_ssa(-128); got != -128 { + fmt.Printf("add_int8 -128+0 = %d, wanted -128\n", got) + failed = true + } + + if got := add_0_int8_ssa(-127); got != -127 { + fmt.Printf("add_int8 0+-127 = %d, wanted -127\n", got) + failed = true + } + + if got := add_int8_0_ssa(-127); got != -127 { + fmt.Printf("add_int8 -127+0 = %d, wanted -127\n", got) + failed = true + } + + if got := add_0_int8_ssa(-1); got != -1 { + fmt.Printf("add_int8 0+-1 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_0_ssa(-1); got != -1 { + fmt.Printf("add_int8 -1+0 = %d, wanted -1\n", got) + failed = true + } + + if got := add_0_int8_ssa(0); got != 0 { + fmt.Printf("add_int8 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_0_ssa(0); got != 0 { + fmt.Printf("add_int8 0+0 = %d, wanted 0\n", got) + failed = true + } + + if got := add_0_int8_ssa(1); got != 1 { + fmt.Printf("add_int8 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int8_0_ssa(1); got != 1 { + fmt.Printf("add_int8 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_0_int8_ssa(126); got != 126 { + fmt.Printf("add_int8 0+126 = %d, wanted 126\n", got) + failed = true + } + + if got := add_int8_0_ssa(126); got != 126 { + fmt.Printf("add_int8 126+0 = %d, wanted 126\n", got) + failed = true + } + + if got := add_0_int8_ssa(127); got != 127 { + fmt.Printf("add_int8 0+127 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_0_ssa(127); got != 127 { + fmt.Printf("add_int8 127+0 = %d, wanted 127\n", got) + failed = true + } + + if got := add_1_int8_ssa(-128); got != -127 { + fmt.Printf("add_int8 1+-128 = %d, wanted -127\n", got) + failed = true + } + + if got := add_int8_1_ssa(-128); got != -127 { + fmt.Printf("add_int8 -128+1 = %d, wanted -127\n", got) + failed = true + } + + if got := add_1_int8_ssa(-127); got != -126 { + fmt.Printf("add_int8 1+-127 = %d, wanted -126\n", got) + failed = true + } + + if got := add_int8_1_ssa(-127); got != -126 { + fmt.Printf("add_int8 -127+1 = %d, wanted -126\n", got) + failed = true + } + + if got := add_1_int8_ssa(-1); got != 0 { + fmt.Printf("add_int8 1+-1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_1_ssa(-1); got != 0 { + fmt.Printf("add_int8 -1+1 = %d, wanted 0\n", got) + failed = true + } + + if got := add_1_int8_ssa(0); got != 1 { + fmt.Printf("add_int8 1+0 = %d, wanted 1\n", got) + failed = true + } + + if got := add_int8_1_ssa(0); got != 1 { + fmt.Printf("add_int8 0+1 = %d, wanted 1\n", got) + failed = true + } + + if got := add_1_int8_ssa(1); got != 2 { + fmt.Printf("add_int8 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_int8_1_ssa(1); got != 2 { + fmt.Printf("add_int8 1+1 = %d, wanted 2\n", got) + failed = true + } + + if got := add_1_int8_ssa(126); got != 127 { + fmt.Printf("add_int8 1+126 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_1_ssa(126); got != 127 { + fmt.Printf("add_int8 126+1 = %d, wanted 127\n", got) + failed = true + } + + if got := add_1_int8_ssa(127); got != -128 { + fmt.Printf("add_int8 1+127 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_1_ssa(127); got != -128 { + fmt.Printf("add_int8 127+1 = %d, wanted -128\n", got) + failed = true + } + + if got := add_126_int8_ssa(-128); got != -2 { + fmt.Printf("add_int8 126+-128 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int8_126_ssa(-128); got != -2 { + fmt.Printf("add_int8 -128+126 = %d, wanted -2\n", got) + failed = true + } + + if got := add_126_int8_ssa(-127); got != -1 { + fmt.Printf("add_int8 126+-127 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_126_ssa(-127); got != -1 { + fmt.Printf("add_int8 -127+126 = %d, wanted -1\n", got) + failed = true + } + + if got := add_126_int8_ssa(-1); got != 125 { + fmt.Printf("add_int8 126+-1 = %d, wanted 125\n", got) + failed = true + } + + if got := add_int8_126_ssa(-1); got != 125 { + fmt.Printf("add_int8 -1+126 = %d, wanted 125\n", got) + failed = true + } + + if got := add_126_int8_ssa(0); got != 126 { + fmt.Printf("add_int8 126+0 = %d, wanted 126\n", got) + failed = true + } + + if got := add_int8_126_ssa(0); got != 126 { + fmt.Printf("add_int8 0+126 = %d, wanted 126\n", got) + failed = true + } + + if got := add_126_int8_ssa(1); got != 127 { + fmt.Printf("add_int8 126+1 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_126_ssa(1); got != 127 { + fmt.Printf("add_int8 1+126 = %d, wanted 127\n", got) + failed = true + } + + if got := add_126_int8_ssa(126); got != -4 { + fmt.Printf("add_int8 126+126 = %d, wanted -4\n", got) + failed = true + } + + if got := add_int8_126_ssa(126); got != -4 { + fmt.Printf("add_int8 126+126 = %d, wanted -4\n", got) + failed = true + } + + if got := add_126_int8_ssa(127); got != -3 { + fmt.Printf("add_int8 126+127 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int8_126_ssa(127); got != -3 { + fmt.Printf("add_int8 127+126 = %d, wanted -3\n", got) + failed = true + } + + if got := add_127_int8_ssa(-128); got != -1 { + fmt.Printf("add_int8 127+-128 = %d, wanted -1\n", got) + failed = true + } + + if got := add_int8_127_ssa(-128); got != -1 { + fmt.Printf("add_int8 -128+127 = %d, wanted -1\n", got) + failed = true + } + + if got := add_127_int8_ssa(-127); got != 0 { + fmt.Printf("add_int8 127+-127 = %d, wanted 0\n", got) + failed = true + } + + if got := add_int8_127_ssa(-127); got != 0 { + fmt.Printf("add_int8 -127+127 = %d, wanted 0\n", got) + failed = true + } + + if got := add_127_int8_ssa(-1); got != 126 { + fmt.Printf("add_int8 127+-1 = %d, wanted 126\n", got) + failed = true + } + + if got := add_int8_127_ssa(-1); got != 126 { + fmt.Printf("add_int8 -1+127 = %d, wanted 126\n", got) + failed = true + } + + if got := add_127_int8_ssa(0); got != 127 { + fmt.Printf("add_int8 127+0 = %d, wanted 127\n", got) + failed = true + } + + if got := add_int8_127_ssa(0); got != 127 { + fmt.Printf("add_int8 0+127 = %d, wanted 127\n", got) + failed = true + } + + if got := add_127_int8_ssa(1); got != -128 { + fmt.Printf("add_int8 127+1 = %d, wanted -128\n", got) + failed = true + } + + if got := add_int8_127_ssa(1); got != -128 { + fmt.Printf("add_int8 1+127 = %d, wanted -128\n", got) + failed = true + } + + if got := add_127_int8_ssa(126); got != -3 { + fmt.Printf("add_int8 127+126 = %d, wanted -3\n", got) + failed = true + } + + if got := add_int8_127_ssa(126); got != -3 { + fmt.Printf("add_int8 126+127 = %d, wanted -3\n", got) + failed = true + } + + if got := add_127_int8_ssa(127); got != -2 { + fmt.Printf("add_int8 127+127 = %d, wanted -2\n", got) + failed = true + } + + if got := add_int8_127_ssa(127); got != -2 { + fmt.Printf("add_int8 127+127 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(-128); got != 0 { + fmt.Printf("sub_int8 -128--128 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(-128); got != 0 { + fmt.Printf("sub_int8 -128--128 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(-127); got != -1 { + fmt.Printf("sub_int8 -128--127 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(-127); got != 1 { + fmt.Printf("sub_int8 -127--128 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(-1); got != -127 { + fmt.Printf("sub_int8 -128--1 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(-1); got != 127 { + fmt.Printf("sub_int8 -1--128 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(0); got != -128 { + fmt.Printf("sub_int8 -128-0 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(0); got != -128 { + fmt.Printf("sub_int8 0--128 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(1); got != 127 { + fmt.Printf("sub_int8 -128-1 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(1); got != -127 { + fmt.Printf("sub_int8 1--128 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(126); got != 2 { + fmt.Printf("sub_int8 -128-126 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(126); got != -2 { + fmt.Printf("sub_int8 126--128 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg128_int8_ssa(127); got != 1 { + fmt.Printf("sub_int8 -128-127 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int8_Neg128_ssa(127); got != -1 { + fmt.Printf("sub_int8 127--128 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(-128); got != 1 { + fmt.Printf("sub_int8 -127--128 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(-128); got != -1 { + fmt.Printf("sub_int8 -128--127 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(-127); got != 0 { + fmt.Printf("sub_int8 -127--127 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(-127); got != 0 { + fmt.Printf("sub_int8 -127--127 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(-1); got != -126 { + fmt.Printf("sub_int8 -127--1 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(-1); got != 126 { + fmt.Printf("sub_int8 -1--127 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(0); got != -127 { + fmt.Printf("sub_int8 -127-0 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(0); got != 127 { + fmt.Printf("sub_int8 0--127 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(1); got != -128 { + fmt.Printf("sub_int8 -127-1 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(1); got != -128 { + fmt.Printf("sub_int8 1--127 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(126); got != 3 { + fmt.Printf("sub_int8 -127-126 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(126); got != -3 { + fmt.Printf("sub_int8 126--127 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_Neg127_int8_ssa(127); got != 2 { + fmt.Printf("sub_int8 -127-127 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int8_Neg127_ssa(127); got != -2 { + fmt.Printf("sub_int8 127--127 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(-128); got != 127 { + fmt.Printf("sub_int8 -1--128 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(-128); got != -127 { + fmt.Printf("sub_int8 -128--1 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(-127); got != 126 { + fmt.Printf("sub_int8 -1--127 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(-127); got != -126 { + fmt.Printf("sub_int8 -127--1 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(-1); got != 0 { + fmt.Printf("sub_int8 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(-1); got != 0 { + fmt.Printf("sub_int8 -1--1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(0); got != -1 { + fmt.Printf("sub_int8 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(0); got != 1 { + fmt.Printf("sub_int8 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(1); got != -2 { + fmt.Printf("sub_int8 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(1); got != 2 { + fmt.Printf("sub_int8 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(126); got != -127 { + fmt.Printf("sub_int8 -1-126 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(126); got != 127 { + fmt.Printf("sub_int8 126--1 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_Neg1_int8_ssa(127); got != -128 { + fmt.Printf("sub_int8 -1-127 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_Neg1_ssa(127); got != -128 { + fmt.Printf("sub_int8 127--1 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_0_int8_ssa(-128); got != -128 { + fmt.Printf("sub_int8 0--128 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_0_ssa(-128); got != -128 { + fmt.Printf("sub_int8 -128-0 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_0_int8_ssa(-127); got != 127 { + fmt.Printf("sub_int8 0--127 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_int8_0_ssa(-127); got != -127 { + fmt.Printf("sub_int8 -127-0 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_0_int8_ssa(-1); got != 1 { + fmt.Printf("sub_int8 0--1 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int8_0_ssa(-1); got != -1 { + fmt.Printf("sub_int8 -1-0 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_0_int8_ssa(0); got != 0 { + fmt.Printf("sub_int8 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_0_ssa(0); got != 0 { + fmt.Printf("sub_int8 0-0 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_0_int8_ssa(1); got != -1 { + fmt.Printf("sub_int8 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int8_0_ssa(1); got != 1 { + fmt.Printf("sub_int8 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_0_int8_ssa(126); got != -126 { + fmt.Printf("sub_int8 0-126 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_int8_0_ssa(126); got != 126 { + fmt.Printf("sub_int8 126-0 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_0_int8_ssa(127); got != -127 { + fmt.Printf("sub_int8 0-127 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_int8_0_ssa(127); got != 127 { + fmt.Printf("sub_int8 127-0 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_1_int8_ssa(-128); got != -127 { + fmt.Printf("sub_int8 1--128 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_int8_1_ssa(-128); got != 127 { + fmt.Printf("sub_int8 -128-1 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_1_int8_ssa(-127); got != -128 { + fmt.Printf("sub_int8 1--127 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_1_ssa(-127); got != -128 { + fmt.Printf("sub_int8 -127-1 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_1_int8_ssa(-1); got != 2 { + fmt.Printf("sub_int8 1--1 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_int8_1_ssa(-1); got != -2 { + fmt.Printf("sub_int8 -1-1 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_1_int8_ssa(0); got != 1 { + fmt.Printf("sub_int8 1-0 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int8_1_ssa(0); got != -1 { + fmt.Printf("sub_int8 0-1 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_1_int8_ssa(1); got != 0 { + fmt.Printf("sub_int8 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_1_ssa(1); got != 0 { + fmt.Printf("sub_int8 1-1 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_1_int8_ssa(126); got != -125 { + fmt.Printf("sub_int8 1-126 = %d, wanted -125\n", got) + failed = true + } + + if got := sub_int8_1_ssa(126); got != 125 { + fmt.Printf("sub_int8 126-1 = %d, wanted 125\n", got) + failed = true + } + + if got := sub_1_int8_ssa(127); got != -126 { + fmt.Printf("sub_int8 1-127 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_int8_1_ssa(127); got != 126 { + fmt.Printf("sub_int8 127-1 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_126_int8_ssa(-128); got != -2 { + fmt.Printf("sub_int8 126--128 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int8_126_ssa(-128); got != 2 { + fmt.Printf("sub_int8 -128-126 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_126_int8_ssa(-127); got != -3 { + fmt.Printf("sub_int8 126--127 = %d, wanted -3\n", got) + failed = true + } + + if got := sub_int8_126_ssa(-127); got != 3 { + fmt.Printf("sub_int8 -127-126 = %d, wanted 3\n", got) + failed = true + } + + if got := sub_126_int8_ssa(-1); got != 127 { + fmt.Printf("sub_int8 126--1 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_int8_126_ssa(-1); got != -127 { + fmt.Printf("sub_int8 -1-126 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_126_int8_ssa(0); got != 126 { + fmt.Printf("sub_int8 126-0 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_int8_126_ssa(0); got != -126 { + fmt.Printf("sub_int8 0-126 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_126_int8_ssa(1); got != 125 { + fmt.Printf("sub_int8 126-1 = %d, wanted 125\n", got) + failed = true + } + + if got := sub_int8_126_ssa(1); got != -125 { + fmt.Printf("sub_int8 1-126 = %d, wanted -125\n", got) + failed = true + } + + if got := sub_126_int8_ssa(126); got != 0 { + fmt.Printf("sub_int8 126-126 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_126_ssa(126); got != 0 { + fmt.Printf("sub_int8 126-126 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_126_int8_ssa(127); got != -1 { + fmt.Printf("sub_int8 126-127 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int8_126_ssa(127); got != 1 { + fmt.Printf("sub_int8 127-126 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_127_int8_ssa(-128); got != -1 { + fmt.Printf("sub_int8 127--128 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_int8_127_ssa(-128); got != 1 { + fmt.Printf("sub_int8 -128-127 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_127_int8_ssa(-127); got != -2 { + fmt.Printf("sub_int8 127--127 = %d, wanted -2\n", got) + failed = true + } + + if got := sub_int8_127_ssa(-127); got != 2 { + fmt.Printf("sub_int8 -127-127 = %d, wanted 2\n", got) + failed = true + } + + if got := sub_127_int8_ssa(-1); got != -128 { + fmt.Printf("sub_int8 127--1 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_int8_127_ssa(-1); got != -128 { + fmt.Printf("sub_int8 -1-127 = %d, wanted -128\n", got) + failed = true + } + + if got := sub_127_int8_ssa(0); got != 127 { + fmt.Printf("sub_int8 127-0 = %d, wanted 127\n", got) + failed = true + } + + if got := sub_int8_127_ssa(0); got != -127 { + fmt.Printf("sub_int8 0-127 = %d, wanted -127\n", got) + failed = true + } + + if got := sub_127_int8_ssa(1); got != 126 { + fmt.Printf("sub_int8 127-1 = %d, wanted 126\n", got) + failed = true + } + + if got := sub_int8_127_ssa(1); got != -126 { + fmt.Printf("sub_int8 1-127 = %d, wanted -126\n", got) + failed = true + } + + if got := sub_127_int8_ssa(126); got != 1 { + fmt.Printf("sub_int8 127-126 = %d, wanted 1\n", got) + failed = true + } + + if got := sub_int8_127_ssa(126); got != -1 { + fmt.Printf("sub_int8 126-127 = %d, wanted -1\n", got) + failed = true + } + + if got := sub_127_int8_ssa(127); got != 0 { + fmt.Printf("sub_int8 127-127 = %d, wanted 0\n", got) + failed = true + } + + if got := sub_int8_127_ssa(127); got != 0 { + fmt.Printf("sub_int8 127-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(-128); got != 1 { + fmt.Printf("div_int8 -128/-128 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(-128); got != 1 { + fmt.Printf("div_int8 -128/-128 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(-127); got != 1 { + fmt.Printf("div_int8 -128/-127 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(-127); got != 0 { + fmt.Printf("div_int8 -127/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(-1); got != -128 { + fmt.Printf("div_int8 -128/-1 = %d, wanted -128\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(-1); got != 0 { + fmt.Printf("div_int8 -1/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(0); got != 0 { + fmt.Printf("div_int8 0/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(1); got != -128 { + fmt.Printf("div_int8 -128/1 = %d, wanted -128\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(1); got != 0 { + fmt.Printf("div_int8 1/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(126); got != -1 { + fmt.Printf("div_int8 -128/126 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(126); got != 0 { + fmt.Printf("div_int8 126/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg128_int8_ssa(127); got != -1 { + fmt.Printf("div_int8 -128/127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_Neg128_ssa(127); got != 0 { + fmt.Printf("div_int8 127/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 -127/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(-128); got != 1 { + fmt.Printf("div_int8 -128/-127 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(-127); got != 1 { + fmt.Printf("div_int8 -127/-127 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(-127); got != 1 { + fmt.Printf("div_int8 -127/-127 = %d, wanted 1\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(-1); got != 127 { + fmt.Printf("div_int8 -127/-1 = %d, wanted 127\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(-1); got != 0 { + fmt.Printf("div_int8 -1/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(0); got != 0 { + fmt.Printf("div_int8 0/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(1); got != -127 { + fmt.Printf("div_int8 -127/1 = %d, wanted -127\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(1); got != 0 { + fmt.Printf("div_int8 1/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(126); got != -1 { + fmt.Printf("div_int8 -127/126 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(126); got != 0 { + fmt.Printf("div_int8 126/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg127_int8_ssa(127); got != -1 { + fmt.Printf("div_int8 -127/127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_Neg127_ssa(127); got != -1 { + fmt.Printf("div_int8 127/-127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 -1/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(-128); got != -128 { + fmt.Printf("div_int8 -128/-1 = %d, wanted -128\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(-127); got != 0 { + fmt.Printf("div_int8 -1/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(-127); got != 127 { + fmt.Printf("div_int8 -127/-1 = %d, wanted 127\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(-1); got != 1 { + fmt.Printf("div_int8 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(-1); got != 1 { + fmt.Printf("div_int8 -1/-1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(0); got != 0 { + fmt.Printf("div_int8 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(1); got != -1 { + fmt.Printf("div_int8 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(1); got != -1 { + fmt.Printf("div_int8 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(126); got != 0 { + fmt.Printf("div_int8 -1/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(126); got != -126 { + fmt.Printf("div_int8 126/-1 = %d, wanted -126\n", got) + failed = true + } + + if got := div_Neg1_int8_ssa(127); got != 0 { + fmt.Printf("div_int8 -1/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_Neg1_ssa(127); got != -127 { + fmt.Printf("div_int8 127/-1 = %d, wanted -127\n", got) + failed = true + } + + if got := div_0_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 0/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int8_ssa(-127); got != 0 { + fmt.Printf("div_int8 0/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int8_ssa(-1); got != 0 { + fmt.Printf("div_int8 0/-1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int8_ssa(1); got != 0 { + fmt.Printf("div_int8 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int8_ssa(126); got != 0 { + fmt.Printf("div_int8 0/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_0_int8_ssa(127); got != 0 { + fmt.Printf("div_int8 0/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 1/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_1_ssa(-128); got != -128 { + fmt.Printf("div_int8 -128/1 = %d, wanted -128\n", got) + failed = true + } + + if got := div_1_int8_ssa(-127); got != 0 { + fmt.Printf("div_int8 1/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_1_ssa(-127); got != -127 { + fmt.Printf("div_int8 -127/1 = %d, wanted -127\n", got) + failed = true + } + + if got := div_1_int8_ssa(-1); got != -1 { + fmt.Printf("div_int8 1/-1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_1_ssa(-1); got != -1 { + fmt.Printf("div_int8 -1/1 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_1_ssa(0); got != 0 { + fmt.Printf("div_int8 0/1 = %d, wanted 0\n", got) + failed = true + } + + if got := div_1_int8_ssa(1); got != 1 { + fmt.Printf("div_int8 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_1_ssa(1); got != 1 { + fmt.Printf("div_int8 1/1 = %d, wanted 1\n", got) + failed = true + } + + if got := div_1_int8_ssa(126); got != 0 { + fmt.Printf("div_int8 1/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_1_ssa(126); got != 126 { + fmt.Printf("div_int8 126/1 = %d, wanted 126\n", got) + failed = true + } + + if got := div_1_int8_ssa(127); got != 0 { + fmt.Printf("div_int8 1/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_1_ssa(127); got != 127 { + fmt.Printf("div_int8 127/1 = %d, wanted 127\n", got) + failed = true + } + + if got := div_126_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 126/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_126_ssa(-128); got != -1 { + fmt.Printf("div_int8 -128/126 = %d, wanted -1\n", got) + failed = true + } + + if got := div_126_int8_ssa(-127); got != 0 { + fmt.Printf("div_int8 126/-127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_126_ssa(-127); got != -1 { + fmt.Printf("div_int8 -127/126 = %d, wanted -1\n", got) + failed = true + } + + if got := div_126_int8_ssa(-1); got != -126 { + fmt.Printf("div_int8 126/-1 = %d, wanted -126\n", got) + failed = true + } + + if got := div_int8_126_ssa(-1); got != 0 { + fmt.Printf("div_int8 -1/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_126_ssa(0); got != 0 { + fmt.Printf("div_int8 0/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_126_int8_ssa(1); got != 126 { + fmt.Printf("div_int8 126/1 = %d, wanted 126\n", got) + failed = true + } + + if got := div_int8_126_ssa(1); got != 0 { + fmt.Printf("div_int8 1/126 = %d, wanted 0\n", got) + failed = true + } + + if got := div_126_int8_ssa(126); got != 1 { + fmt.Printf("div_int8 126/126 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_126_ssa(126); got != 1 { + fmt.Printf("div_int8 126/126 = %d, wanted 1\n", got) + failed = true + } + + if got := div_126_int8_ssa(127); got != 0 { + fmt.Printf("div_int8 126/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_126_ssa(127); got != 1 { + fmt.Printf("div_int8 127/126 = %d, wanted 1\n", got) + failed = true + } + + if got := div_127_int8_ssa(-128); got != 0 { + fmt.Printf("div_int8 127/-128 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_127_ssa(-128); got != -1 { + fmt.Printf("div_int8 -128/127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_127_int8_ssa(-127); got != -1 { + fmt.Printf("div_int8 127/-127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_int8_127_ssa(-127); got != -1 { + fmt.Printf("div_int8 -127/127 = %d, wanted -1\n", got) + failed = true + } + + if got := div_127_int8_ssa(-1); got != -127 { + fmt.Printf("div_int8 127/-1 = %d, wanted -127\n", got) + failed = true + } + + if got := div_int8_127_ssa(-1); got != 0 { + fmt.Printf("div_int8 -1/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_int8_127_ssa(0); got != 0 { + fmt.Printf("div_int8 0/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_127_int8_ssa(1); got != 127 { + fmt.Printf("div_int8 127/1 = %d, wanted 127\n", got) + failed = true + } + + if got := div_int8_127_ssa(1); got != 0 { + fmt.Printf("div_int8 1/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_127_int8_ssa(126); got != 1 { + fmt.Printf("div_int8 127/126 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_127_ssa(126); got != 0 { + fmt.Printf("div_int8 126/127 = %d, wanted 0\n", got) + failed = true + } + + if got := div_127_int8_ssa(127); got != 1 { + fmt.Printf("div_int8 127/127 = %d, wanted 1\n", got) + failed = true + } + + if got := div_int8_127_ssa(127); got != 1 { + fmt.Printf("div_int8 127/127 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(-128); got != 0 { + fmt.Printf("mul_int8 -128*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(-128); got != 0 { + fmt.Printf("mul_int8 -128*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(-127); got != -128 { + fmt.Printf("mul_int8 -128*-127 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(-127); got != -128 { + fmt.Printf("mul_int8 -127*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(-1); got != -128 { + fmt.Printf("mul_int8 -128*-1 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(-1); got != -128 { + fmt.Printf("mul_int8 -1*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 -128*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(1); got != -128 { + fmt.Printf("mul_int8 -128*1 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(1); got != -128 { + fmt.Printf("mul_int8 1*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(126); got != 0 { + fmt.Printf("mul_int8 -128*126 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(126); got != 0 { + fmt.Printf("mul_int8 126*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg128_int8_ssa(127); got != -128 { + fmt.Printf("mul_int8 -128*127 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg128_ssa(127); got != -128 { + fmt.Printf("mul_int8 127*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -127*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -128*-127 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(-127); got != 1 { + fmt.Printf("mul_int8 -127*-127 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(-127); got != 1 { + fmt.Printf("mul_int8 -127*-127 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(-1); got != 127 { + fmt.Printf("mul_int8 -127*-1 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(-1); got != 127 { + fmt.Printf("mul_int8 -1*-127 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 -127*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*-127 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(1); got != -127 { + fmt.Printf("mul_int8 -127*1 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(1); got != -127 { + fmt.Printf("mul_int8 1*-127 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(126); got != 126 { + fmt.Printf("mul_int8 -127*126 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(126); got != 126 { + fmt.Printf("mul_int8 126*-127 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_Neg127_int8_ssa(127); got != -1 { + fmt.Printf("mul_int8 -127*127 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int8_Neg127_ssa(127); got != -1 { + fmt.Printf("mul_int8 127*-127 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -1*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -128*-1 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(-127); got != 127 { + fmt.Printf("mul_int8 -1*-127 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(-127); got != 127 { + fmt.Printf("mul_int8 -127*-1 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(-1); got != 1 { + fmt.Printf("mul_int8 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(-1); got != 1 { + fmt.Printf("mul_int8 -1*-1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(1); got != -1 { + fmt.Printf("mul_int8 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(1); got != -1 { + fmt.Printf("mul_int8 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(126); got != -126 { + fmt.Printf("mul_int8 -1*126 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(126); got != -126 { + fmt.Printf("mul_int8 126*-1 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_Neg1_int8_ssa(127); got != -127 { + fmt.Printf("mul_int8 -1*127 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_int8_Neg1_ssa(127); got != -127 { + fmt.Printf("mul_int8 127*-1 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_0_int8_ssa(-128); got != 0 { + fmt.Printf("mul_int8 0*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(-128); got != 0 { + fmt.Printf("mul_int8 -128*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(-127); got != 0 { + fmt.Printf("mul_int8 0*-127 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(-127); got != 0 { + fmt.Printf("mul_int8 -127*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(-1); got != 0 { + fmt.Printf("mul_int8 0*-1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(-1); got != 0 { + fmt.Printf("mul_int8 -1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(1); got != 0 { + fmt.Printf("mul_int8 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(1); got != 0 { + fmt.Printf("mul_int8 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(126); got != 0 { + fmt.Printf("mul_int8 0*126 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(126); got != 0 { + fmt.Printf("mul_int8 126*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_0_int8_ssa(127); got != 0 { + fmt.Printf("mul_int8 0*127 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_0_ssa(127); got != 0 { + fmt.Printf("mul_int8 127*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int8_ssa(-128); got != -128 { + fmt.Printf("mul_int8 1*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_1_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -128*1 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_1_int8_ssa(-127); got != -127 { + fmt.Printf("mul_int8 1*-127 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_int8_1_ssa(-127); got != -127 { + fmt.Printf("mul_int8 -127*1 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_1_int8_ssa(-1); got != -1 { + fmt.Printf("mul_int8 1*-1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int8_1_ssa(-1); got != -1 { + fmt.Printf("mul_int8 -1*1 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_1_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 1*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_1_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*1 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_1_int8_ssa(1); got != 1 { + fmt.Printf("mul_int8 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int8_1_ssa(1); got != 1 { + fmt.Printf("mul_int8 1*1 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_1_int8_ssa(126); got != 126 { + fmt.Printf("mul_int8 1*126 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_int8_1_ssa(126); got != 126 { + fmt.Printf("mul_int8 126*1 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_1_int8_ssa(127); got != 127 { + fmt.Printf("mul_int8 1*127 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_int8_1_ssa(127); got != 127 { + fmt.Printf("mul_int8 127*1 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_126_int8_ssa(-128); got != 0 { + fmt.Printf("mul_int8 126*-128 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_126_ssa(-128); got != 0 { + fmt.Printf("mul_int8 -128*126 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_126_int8_ssa(-127); got != 126 { + fmt.Printf("mul_int8 126*-127 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_int8_126_ssa(-127); got != 126 { + fmt.Printf("mul_int8 -127*126 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_126_int8_ssa(-1); got != -126 { + fmt.Printf("mul_int8 126*-1 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_int8_126_ssa(-1); got != -126 { + fmt.Printf("mul_int8 -1*126 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_126_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 126*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_126_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*126 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_126_int8_ssa(1); got != 126 { + fmt.Printf("mul_int8 126*1 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_int8_126_ssa(1); got != 126 { + fmt.Printf("mul_int8 1*126 = %d, wanted 126\n", got) + failed = true + } + + if got := mul_126_int8_ssa(126); got != 4 { + fmt.Printf("mul_int8 126*126 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_int8_126_ssa(126); got != 4 { + fmt.Printf("mul_int8 126*126 = %d, wanted 4\n", got) + failed = true + } + + if got := mul_126_int8_ssa(127); got != -126 { + fmt.Printf("mul_int8 126*127 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_int8_126_ssa(127); got != -126 { + fmt.Printf("mul_int8 127*126 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_127_int8_ssa(-128); got != -128 { + fmt.Printf("mul_int8 127*-128 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_int8_127_ssa(-128); got != -128 { + fmt.Printf("mul_int8 -128*127 = %d, wanted -128\n", got) + failed = true + } + + if got := mul_127_int8_ssa(-127); got != -1 { + fmt.Printf("mul_int8 127*-127 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_int8_127_ssa(-127); got != -1 { + fmt.Printf("mul_int8 -127*127 = %d, wanted -1\n", got) + failed = true + } + + if got := mul_127_int8_ssa(-1); got != -127 { + fmt.Printf("mul_int8 127*-1 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_int8_127_ssa(-1); got != -127 { + fmt.Printf("mul_int8 -1*127 = %d, wanted -127\n", got) + failed = true + } + + if got := mul_127_int8_ssa(0); got != 0 { + fmt.Printf("mul_int8 127*0 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_int8_127_ssa(0); got != 0 { + fmt.Printf("mul_int8 0*127 = %d, wanted 0\n", got) + failed = true + } + + if got := mul_127_int8_ssa(1); got != 127 { + fmt.Printf("mul_int8 127*1 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_int8_127_ssa(1); got != 127 { + fmt.Printf("mul_int8 1*127 = %d, wanted 127\n", got) + failed = true + } + + if got := mul_127_int8_ssa(126); got != -126 { + fmt.Printf("mul_int8 127*126 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_int8_127_ssa(126); got != -126 { + fmt.Printf("mul_int8 126*127 = %d, wanted -126\n", got) + failed = true + } + + if got := mul_127_int8_ssa(127); got != 1 { + fmt.Printf("mul_int8 127*127 = %d, wanted 1\n", got) + failed = true + } + + if got := mul_int8_127_ssa(127); got != 1 { + fmt.Printf("mul_int8 127*127 = %d, wanted 1\n", got) + failed = true + } + if failed { + panic("tests failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/arith_ssa.go b/src/cmd/compile/internal/gc/testdata/arith_ssa.go new file mode 100644 index 0000000000..f4bea0ed11 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/arith_ssa.go @@ -0,0 +1,438 @@ +// run + +// 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 "fmt" + +const ( + y = 0x0fffFFFF +) + +//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() { + if want, got := uint32(268435440), invalidAdd_ssa(1); want != got { + println("testLargeConst add failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(4026531858), invalidSub_ssa(1); want != got { + println("testLargeConst sub failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(268435455), invalidMul_ssa(1); want != got { + println("testLargeConst mul failed, wanted", want, "got", got) + failed = true + } +} + +// testArithRshConst ensures that "const >> const" right shifts correctly perform +// sign extension on the lhs constant +func testArithRshConst() { + wantu := uint64(0x4000000000000000) + if got := arithRshuConst_ssa(); got != wantu { + println("arithRshuConst failed, wanted", wantu, "got", got) + failed = true + } + + wants := int64(-0x4000000000000000) + if got := arithRshConst_ssa(); got != wants { + println("arithRshuConst failed, wanted", wants, "got", got) + failed = true + } +} + +//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() { + want := int64(-1) + if got := arithConstShift_ssa(-1); want != got { + println("arithConstShift_ssa(-1) failed, wanted", want, "got", got) + failed = true + } + want = 0 + if got := arithConstShift_ssa(1); want != got { + println("arithConstShift_ssa(1) failed, wanted", want, "got", got) + failed = true + } +} + +// overflowConstShift_ssa verifes 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() { + want := int64(0) + for x := int64(-127); x < int64(127); x++ { + got := overflowConstShift64_ssa(x) + if want != got { + fmt.Printf("overflowShift64 failed, wanted %d got %d\n", want, got) + } + got = int64(overflowConstShift32_ssa(x)) + if want != got { + fmt.Printf("overflowShift32 failed, wanted %d got %d\n", want, got) + } + got = int64(overflowConstShift16_ssa(x)) + if want != got { + fmt.Printf("overflowShift16 failed, wanted %d got %d\n", want, got) + } + got = int64(overflowConstShift8_ssa(x)) + if want != got { + fmt.Printf("overflowShift8 failed, wanted %d got %d\n", want, got) + } + } +} + +// test64BitConstMult tests that rewrite rules don't fold 64 bit constants +// into multiply instructions. +func test64BitConstMult() { + want := int64(103079215109) + if got := test64BitConstMult_ssa(1, 2); want != got { + println("test64BitConstMult failed, wanted", want, "got", got) + failed = true + } +} + +//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() { + want := int64(3567671782835376650) + if got := test64BitConstAdd_ssa(1, 2); want != got { + println("test64BitConstAdd failed, wanted", want, "got", got) + failed = true + } +} + +//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() { + want := int8(-9) + if got := testRegallocCVSpill_ssa(1, 2, 3, 4); want != got { + println("testRegallocCVSpill failed, wanted", want, "got", got) + failed = true + } +} + +//go:noinline +func testRegallocCVSpill_ssa(a, b, c, d int8) int8 { + return a + -32 + b + 63*c*-87*d +} + +func testBitwiseLogic() { + a, b := uint32(57623283), uint32(1314713839) + if want, got := uint32(38551779), testBitwiseAnd_ssa(a, b); want != got { + println("testBitwiseAnd failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(1333785343), testBitwiseOr_ssa(a, b); want != got { + println("testBitwiseOr failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(1295233564), testBitwiseXor_ssa(a, b); want != got { + println("testBitwiseXor failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(832), testBitwiseLsh_ssa(13, 4, 2); want != got { + println("testBitwiseLsh failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(0), testBitwiseLsh_ssa(13, 25, 15); want != got { + println("testBitwiseLsh failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(0), testBitwiseLsh_ssa(-13, 25, 15); want != got { + println("testBitwiseLsh failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(-13), testBitwiseRsh_ssa(-832, 4, 2); want != got { + println("testBitwiseRsh failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(0), testBitwiseRsh_ssa(13, 25, 15); want != got { + println("testBitwiseRsh failed, wanted", want, "got", got) + failed = true + } + if want, got := int32(-1), testBitwiseRsh_ssa(-13, 25, 15); want != got { + println("testBitwiseRsh failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(0x3ffffff), testBitwiseRshU_ssa(0xffffffff, 4, 2); want != got { + println("testBitwiseRshU failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(0), testBitwiseRshU_ssa(13, 25, 15); want != got { + println("testBitwiseRshU failed, wanted", want, "got", got) + failed = true + } + if want, got := uint32(0), testBitwiseRshU_ssa(0x8aaaaaaa, 25, 15); want != got { + println("testBitwiseRshU failed, wanted", want, "got", got) + failed = true + } +} + +//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() { + want := 141 + if got := testShiftCX_ssa(); want != got { + println("testShiftCX failed, wanted", want, "got", got) + failed = true + } +} + +// testSubqToNegq ensures that the SUBQ -> NEGQ translation works correctly. +func testSubqToNegq() { + want := int64(-318294940372190156) + if got := testSubqToNegq_ssa(1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2); want != got { + println("testSubqToNegq failed, wanted", want, "got", got) + failed = true + } +} + +//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() { + want1, want2 := int32(0x55555555), int32(-0x55555556) + if got1, got2 := testOcom_ssa(0x55555555, 0x55555555); want1 != got1 || want2 != got2 { + println("testSubqToNegq failed, wanted", want1, "and", want2, + "got", got1, "and", got2) + failed = true + } +} + +//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() { + 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 { + println("lrot1_ssa(0xf, 0xf, 0xf, 0xf)=", + wantA, wantB, wantC, wantD, ", got", a, b, c, d) + failed = true + } + x := lrot2_ssa(0xb0000001, 32) + wantX := uint32(0xb0000001) + if x != wantX { + println("lrot2_ssa(0xb0000001, 32)=", + wantX, ", got", x) + failed = true + } + x = lrot3_ssa(0xb0000001) + if x != wantX { + println("lrot3_ssa(0xb0000001)=", + wantX, ", got", x) + failed = true + } + +} + +//go:noinline +func sub1_ssa() uint64 { + v1 := uint64(3) // uint64 + return v1*v1 - (v1&v1)&v1 +} +func sub2_ssa() uint8 { + switch { + } + 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() { + x1 := sub1_ssa() + want1 := uint64(6) + if x1 != want1 { + println("sub1_ssa()=", want1, ", got", x1) + failed = true + } + x2 := sub2_ssa() + want2 := uint8(251) + if x2 != want2 { + println("sub2_ssa()=", want2, ", got", x2) + failed = true + } +} + +//go:noinline +func orPhi_ssa(a bool, x int) int { + v := 0 + if a { + v = -1 + } else { + v = -1 + } + return x | v +} + +func testOrPhi() { + if want, got := -1, orPhi_ssa(true, 4); got != want { + println("orPhi_ssa(true, 4)=", got, " want ", want) + } + if want, got := -1, orPhi_ssa(false, 0); got != want { + println("orPhi_ssa(false, 0)=", got, " want ", want) + } +} + +var failed = false + +func main() { + + test64BitConstMult() + test64BitConstAdd() + testRegallocCVSpill() + testSubqToNegq() + testBitwiseLogic() + testOcom() + testLrot() + testShiftCX() + testSubConst() + testOverflowConstShift() + testArithConstShift() + testArithRshConst() + testLargeConst() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/array_ssa.go b/src/cmd/compile/internal/gc/testdata/array_ssa.go new file mode 100644 index 0000000000..0334339d43 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/array_ssa.go @@ -0,0 +1,142 @@ +package main + +var failed = false + +//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() { + 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, t := range tests { + if l, c := t.fn(a, t.i, t.j); l != t.l && c != t.c { + println("#", i, " len(a[", t.i, ":", t.j, "]), cap(a[", t.i, ":", t.j, "]) =", l, c, + ", want", t.l, t.c) + failed = true + } + } +} + +//go:noinline +func testSliceGetElement_ssa(a [10]int, i, j, p int) int { + return a[i:j][p] +} + +func testSliceGetElement() { + 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, t := range tests { + if got := testSliceGetElement_ssa(a, t.i, t.j, t.p); got != t.want { + println("#", i, " a[", t.i, ":", t.j, "][", t.p, "] = ", got, " wanted ", t.want) + failed = true + } + } +} + +//go:noinline +func testSliceSetElement_ssa(a *[10]int, i, j, p, x int) { + (*a)[i:j][p] = x +} + +func testSliceSetElement() { + 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, t := range tests { + testSliceSetElement_ssa(&a, t.i, t.j, t.p, t.want) + if got := a[t.i+t.p]; got != t.want { + println("#", i, " a[", t.i, ":", t.j, "][", t.p, "] = ", got, " wanted ", t.want) + failed = true + } + } +} + +func testSlicePanic1() { + defer func() { + if r := recover(); r != nil { + println("paniced as expected") + } + }() + + a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90} + testSliceLenCap12_ssa(a, 3, 12) + println("expected to panic, but didn't") + failed = true +} + +func testSlicePanic2() { + defer func() { + if r := recover(); r != nil { + println("paniced as expected") + } + }() + + a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90} + testSliceGetElement_ssa(a, 3, 7, 4) + println("expected to panic, but didn't") + failed = true +} + +func main() { + testSliceLenCap() + testSliceGetElement() + testSliceSetElement() + testSlicePanic1() + testSlicePanic2() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/assert_ssa.go b/src/cmd/compile/internal/gc/testdata/assert_ssa.go new file mode 100644 index 0000000000..d64d4fc35a --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/assert_ssa.go @@ -0,0 +1,147 @@ +// run + +// 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 ( + "fmt" + "runtime" +) + +type ( + S struct{} + T struct{} + + I interface { + F() + } +) + +var ( + s *S + t *T +) + +func (s *S) F() {} +func (t *T) F() {} + +func e2t_ssa(e interface{}) *T { + return e.(*T) +} + +func i2t_ssa(i I) *T { + return i.(*T) +} + +func testAssertE2TOk() { + if got := e2t_ssa(t); got != t { + fmt.Printf("e2t_ssa(t)=%v want %v", got, t) + failed = true + } +} + +func testAssertE2TPanic() { + var got *T + defer func() { + if got != nil { + fmt.Printf("e2t_ssa(s)=%v want nil", got) + failed = true + } + e := recover() + err, ok := e.(*runtime.TypeAssertionError) + if !ok { + fmt.Printf("e2t_ssa(s) panic type %T", e) + failed = true + } + want := "interface conversion: interface {} is *main.S, not *main.T" + if err.Error() != want { + fmt.Printf("e2t_ssa(s) wrong error, want '%s', got '%s'\n", want, err.Error()) + failed = true + } + }() + got = e2t_ssa(s) + fmt.Printf("e2t_ssa(s) should panic") + failed = true +} + +func testAssertI2TOk() { + if got := i2t_ssa(t); got != t { + fmt.Printf("i2t_ssa(t)=%v want %v", got, t) + failed = true + } +} + +func testAssertI2TPanic() { + var got *T + defer func() { + if got != nil { + fmt.Printf("i2t_ssa(s)=%v want nil", got) + failed = true + } + e := recover() + err, ok := e.(*runtime.TypeAssertionError) + if !ok { + fmt.Printf("i2t_ssa(s) panic type %T", e) + failed = true + } + want := "interface conversion: main.I is *main.S, not *main.T" + if err.Error() != want { + fmt.Printf("i2t_ssa(s) wrong error, want '%s', got '%s'\n", want, err.Error()) + failed = true + } + }() + got = i2t_ssa(s) + fmt.Printf("i2t_ssa(s) should panic") + failed = true +} + +func e2t2_ssa(e interface{}) (*T, bool) { + t, ok := e.(*T) + return t, ok +} + +func i2t2_ssa(i I) (*T, bool) { + t, ok := i.(*T) + return t, ok +} + +func testAssertE2T2() { + if got, ok := e2t2_ssa(t); !ok || got != t { + fmt.Printf("e2t2_ssa(t)=(%v, %v) want (%v, %v)", got, ok, t, true) + failed = true + } + if got, ok := e2t2_ssa(s); ok || got != nil { + fmt.Printf("e2t2_ssa(s)=(%v, %v) want (%v, %v)", got, ok, nil, false) + failed = true + } +} + +func testAssertI2T2() { + if got, ok := i2t2_ssa(t); !ok || got != t { + fmt.Printf("i2t2_ssa(t)=(%v, %v) want (%v, %v)", got, ok, t, true) + failed = true + } + if got, ok := i2t2_ssa(s); ok || got != nil { + fmt.Printf("i2t2_ssa(s)=(%v, %v) want (%v, %v)", got, ok, nil, false) + failed = true + } +} + +var failed = false + +func main() { + testAssertE2TOk() + testAssertE2TPanic() + testAssertI2TOk() + testAssertI2TPanic() + testAssertE2T2() + testAssertI2T2() + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/break_ssa.go b/src/cmd/compile/internal/gc/testdata/break_ssa.go new file mode 100644 index 0000000000..855ef70049 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/break_ssa.go @@ -0,0 +1,255 @@ +// run + +// 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 + +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 +} + +func main() { + 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 + } + + var failed bool + for _, test := range tests { + if got := test.fn(); test.fn() != test.want { + print(test.name, "()=", got, ", want ", test.want, "\n") + failed = true + } + } + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/chan_ssa.go b/src/cmd/compile/internal/gc/testdata/chan_ssa.go new file mode 100644 index 0000000000..0766fcda5b --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/chan_ssa.go @@ -0,0 +1,73 @@ +// 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_ssa.go tests chan operations. +package main + +import "fmt" + +var failed = false + +//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() { + + v := make(chan int, 10) + v <- 1 + v <- 1 + v <- 1 + + if want, got := 3, lenChan_ssa(v); got != want { + fmt.Printf("expected len(chan) = %d, got %d", want, got) + failed = true + } +} + +func testLenNilChan() { + + var v chan int + if want, got := 0, lenChan_ssa(v); got != want { + fmt.Printf("expected len(nil) = %d, got %d", want, got) + failed = true + } +} + +func testCapChan() { + + v := make(chan int, 25) + + if want, got := 25, capChan_ssa(v); got != want { + fmt.Printf("expected cap(chan) = %d, got %d", want, got) + failed = true + } +} + +func testCapNilChan() { + + var v chan int + if want, got := 0, capChan_ssa(v); got != want { + fmt.Printf("expected cap(nil) = %d, got %d", want, got) + failed = true + } +} + +func main() { + testLenChan() + testLenNilChan() + + testCapChan() + testCapNilChan() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/closure_ssa.go b/src/cmd/compile/internal/gc/testdata/closure_ssa.go new file mode 100644 index 0000000000..70181bc24b --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/closure_ssa.go @@ -0,0 +1,38 @@ +// 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_ssa.go tests map operations. +package main + +import "fmt" + +var failed = false + +//go:noinline +func testCFunc_ssa() int { + a := 0 + b := func() { + switch { + } + a++ + } + b() + b() + return a +} + +func testCFunc() { + if want, got := 2, testCFunc_ssa(); got != want { + fmt.Printf("expected %d, got %d", want, got) + failed = true + } +} + +func main() { + testCFunc() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/cmp_ssa.go b/src/cmd/compile/internal/gc/testdata/cmp_ssa.go new file mode 100644 index 0000000000..ba420f2e4e --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/cmp_ssa.go @@ -0,0 +1,48 @@ +// 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 "fmt" + +var failed = false + +//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() { + if wanted, got := true, eq_ssa(6); wanted != got { + fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got) + failed = true + } + if wanted, got := false, eq_ssa(7); wanted != got { + fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got) + failed = true + } + + if wanted, got := false, neq_ssa(6); wanted != got { + fmt.Printf("neq_ssa: expected %v, got %v\n", wanted, got) + failed = true + } + if wanted, got := true, neq_ssa(7); wanted != got { + fmt.Printf("neq_ssa: expected %v, got %v\n", wanted, got) + failed = true + } +} + +func main() { + testCmp() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/compound_ssa.go b/src/cmd/compile/internal/gc/testdata/compound_ssa.go new file mode 100644 index 0000000000..b0e4962f5e --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/compound_ssa.go @@ -0,0 +1,145 @@ +// run + +// 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 "fmt" + +func string_ssa(a, b string, x bool) string { + s := "" + if x { + s = a + } else { + s = b + } + return s +} + +func testString() { + a := "foo" + b := "barz" + if want, got := a, string_ssa(a, b, true); got != want { + fmt.Printf("string_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } + if want, got := b, string_ssa(a, b, false); got != want { + fmt.Printf("string_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want) + failed = true + } +} + +func complex64_ssa(a, b complex64, x bool) complex64 { + switch { + } + var c complex64 + if x { + c = a + } else { + c = b + } + return c +} + +func complex128_ssa(a, b complex128, x bool) complex128 { + switch { + } + var c complex128 + if x { + c = a + } else { + c = b + } + return c +} + +func testComplex64() { + var a complex64 = 1 + 2i + var b complex64 = 3 + 4i + + if want, got := a, complex64_ssa(a, b, true); got != want { + fmt.Printf("complex64_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } + if want, got := b, complex64_ssa(a, b, false); got != want { + fmt.Printf("complex64_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } +} + +func testComplex128() { + var a complex128 = 1 + 2i + var b complex128 = 3 + 4i + + if want, got := a, complex128_ssa(a, b, true); got != want { + fmt.Printf("complex128_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } + if want, got := b, complex128_ssa(a, b, false); got != want { + fmt.Printf("complex128_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } +} + +func slice_ssa(a, b []byte, x bool) []byte { + var s []byte + if x { + s = a + } else { + s = b + } + return s +} + +func testSlice() { + a := []byte{3, 4, 5} + b := []byte{7, 8, 9} + if want, got := byte(3), slice_ssa(a, b, true)[0]; got != want { + fmt.Printf("slice_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } + if want, got := byte(7), slice_ssa(a, b, false)[0]; got != want { + fmt.Printf("slice_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want) + failed = true + } +} + +func interface_ssa(a, b interface{}, x bool) interface{} { + var s interface{} + if x { + s = a + } else { + s = b + } + return s +} + +func testInterface() { + a := interface{}(3) + b := interface{}(4) + if want, got := 3, interface_ssa(a, b, true).(int); got != want { + fmt.Printf("interface_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) + failed = true + } + if want, got := 4, interface_ssa(a, b, false).(int); got != want { + fmt.Printf("interface_ssa(%v, %v, false) = %v, want %v\n", a, b, got, want) + failed = true + } +} + +var failed = false + +func main() { + testString() + testSlice() + testInterface() + testComplex64() + testComplex128() + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/copy_ssa.go b/src/cmd/compile/internal/gc/testdata/copy_ssa.go new file mode 100644 index 0000000000..44f0223a43 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/copy_ssa.go @@ -0,0 +1,726 @@ +// run +// autogenerated from gen/copyGen.go - do not edit! +package main + +import "fmt" + +type T1 struct { + pre [8]byte + mid [1]byte + post [8]byte +} + +func t1copy_ssa(y, x *[1]byte) { + switch { + } + *y = *x +} +func testCopy1() { + 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 { + fmt.Printf("t1copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T2 struct { + pre [8]byte + mid [2]byte + post [8]byte +} + +func t2copy_ssa(y, x *[2]byte) { + switch { + } + *y = *x +} +func testCopy2() { + 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 { + fmt.Printf("t2copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T3 struct { + pre [8]byte + mid [3]byte + post [8]byte +} + +func t3copy_ssa(y, x *[3]byte) { + switch { + } + *y = *x +} +func testCopy3() { + 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 { + fmt.Printf("t3copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T4 struct { + pre [8]byte + mid [4]byte + post [8]byte +} + +func t4copy_ssa(y, x *[4]byte) { + switch { + } + *y = *x +} +func testCopy4() { + 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 { + fmt.Printf("t4copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T5 struct { + pre [8]byte + mid [5]byte + post [8]byte +} + +func t5copy_ssa(y, x *[5]byte) { + switch { + } + *y = *x +} +func testCopy5() { + 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 { + fmt.Printf("t5copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T6 struct { + pre [8]byte + mid [6]byte + post [8]byte +} + +func t6copy_ssa(y, x *[6]byte) { + switch { + } + *y = *x +} +func testCopy6() { + 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 { + fmt.Printf("t6copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T7 struct { + pre [8]byte + mid [7]byte + post [8]byte +} + +func t7copy_ssa(y, x *[7]byte) { + switch { + } + *y = *x +} +func testCopy7() { + 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 { + fmt.Printf("t7copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T8 struct { + pre [8]byte + mid [8]byte + post [8]byte +} + +func t8copy_ssa(y, x *[8]byte) { + switch { + } + *y = *x +} +func testCopy8() { + 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 { + fmt.Printf("t8copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T9 struct { + pre [8]byte + mid [9]byte + post [8]byte +} + +func t9copy_ssa(y, x *[9]byte) { + switch { + } + *y = *x +} +func testCopy9() { + 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 { + fmt.Printf("t9copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T10 struct { + pre [8]byte + mid [10]byte + post [8]byte +} + +func t10copy_ssa(y, x *[10]byte) { + switch { + } + *y = *x +} +func testCopy10() { + 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 { + fmt.Printf("t10copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T15 struct { + pre [8]byte + mid [15]byte + post [8]byte +} + +func t15copy_ssa(y, x *[15]byte) { + switch { + } + *y = *x +} +func testCopy15() { + 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 { + fmt.Printf("t15copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T16 struct { + pre [8]byte + mid [16]byte + post [8]byte +} + +func t16copy_ssa(y, x *[16]byte) { + switch { + } + *y = *x +} +func testCopy16() { + 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 { + fmt.Printf("t16copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T17 struct { + pre [8]byte + mid [17]byte + post [8]byte +} + +func t17copy_ssa(y, x *[17]byte) { + switch { + } + *y = *x +} +func testCopy17() { + 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 { + fmt.Printf("t17copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T23 struct { + pre [8]byte + mid [23]byte + post [8]byte +} + +func t23copy_ssa(y, x *[23]byte) { + switch { + } + *y = *x +} +func testCopy23() { + 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 { + fmt.Printf("t23copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T24 struct { + pre [8]byte + mid [24]byte + post [8]byte +} + +func t24copy_ssa(y, x *[24]byte) { + switch { + } + *y = *x +} +func testCopy24() { + 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 { + fmt.Printf("t24copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T25 struct { + pre [8]byte + mid [25]byte + post [8]byte +} + +func t25copy_ssa(y, x *[25]byte) { + switch { + } + *y = *x +} +func testCopy25() { + 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 { + fmt.Printf("t25copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T31 struct { + pre [8]byte + mid [31]byte + post [8]byte +} + +func t31copy_ssa(y, x *[31]byte) { + switch { + } + *y = *x +} +func testCopy31() { + 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 { + fmt.Printf("t31copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T32 struct { + pre [8]byte + mid [32]byte + post [8]byte +} + +func t32copy_ssa(y, x *[32]byte) { + switch { + } + *y = *x +} +func testCopy32() { + 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 { + fmt.Printf("t32copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T33 struct { + pre [8]byte + mid [33]byte + post [8]byte +} + +func t33copy_ssa(y, x *[33]byte) { + switch { + } + *y = *x +} +func testCopy33() { + 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 { + fmt.Printf("t33copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T63 struct { + pre [8]byte + mid [63]byte + post [8]byte +} + +func t63copy_ssa(y, x *[63]byte) { + switch { + } + *y = *x +} +func testCopy63() { + 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 { + fmt.Printf("t63copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T64 struct { + pre [8]byte + mid [64]byte + post [8]byte +} + +func t64copy_ssa(y, x *[64]byte) { + switch { + } + *y = *x +} +func testCopy64() { + 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 { + fmt.Printf("t64copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T65 struct { + pre [8]byte + mid [65]byte + post [8]byte +} + +func t65copy_ssa(y, x *[65]byte) { + switch { + } + *y = *x +} +func testCopy65() { + 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 { + fmt.Printf("t65copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1023 struct { + pre [8]byte + mid [1023]byte + post [8]byte +} + +func t1023copy_ssa(y, x *[1023]byte) { + switch { + } + *y = *x +} +func testCopy1023() { + 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 { + fmt.Printf("t1023copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1024 struct { + pre [8]byte + mid [1024]byte + post [8]byte +} + +func t1024copy_ssa(y, x *[1024]byte) { + switch { + } + *y = *x +} +func testCopy1024() { + 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 { + fmt.Printf("t1024copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1025 struct { + pre [8]byte + mid [1025]byte + post [8]byte +} + +func t1025copy_ssa(y, x *[1025]byte) { + switch { + } + *y = *x +} +func testCopy1025() { + 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 { + fmt.Printf("t1025copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1031 struct { + pre [8]byte + mid [1031]byte + post [8]byte +} + +func t1031copy_ssa(y, x *[1031]byte) { + switch { + } + *y = *x +} +func testCopy1031() { + 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 { + fmt.Printf("t1031copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1032 struct { + pre [8]byte + mid [1032]byte + post [8]byte +} + +func t1032copy_ssa(y, x *[1032]byte) { + switch { + } + *y = *x +} +func testCopy1032() { + 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 { + fmt.Printf("t1032copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1033 struct { + pre [8]byte + mid [1033]byte + post [8]byte +} + +func t1033copy_ssa(y, x *[1033]byte) { + switch { + } + *y = *x +} +func testCopy1033() { + 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 { + fmt.Printf("t1033copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1039 struct { + pre [8]byte + mid [1039]byte + post [8]byte +} + +func t1039copy_ssa(y, x *[1039]byte) { + switch { + } + *y = *x +} +func testCopy1039() { + 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 { + fmt.Printf("t1039copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1040 struct { + pre [8]byte + mid [1040]byte + post [8]byte +} + +func t1040copy_ssa(y, x *[1040]byte) { + switch { + } + *y = *x +} +func testCopy1040() { + 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 { + fmt.Printf("t1040copy got=%v, want %v\n", a, want) + failed = true + } +} + +type T1041 struct { + pre [8]byte + mid [1041]byte + post [8]byte +} + +func t1041copy_ssa(y, x *[1041]byte) { + switch { + } + *y = *x +} +func testCopy1041() { + 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 { + fmt.Printf("t1041copy got=%v, want %v\n", a, want) + failed = true + } +} + +var failed bool + +func main() { + testCopy1() + testCopy2() + testCopy3() + testCopy4() + testCopy5() + testCopy6() + testCopy7() + testCopy8() + testCopy9() + testCopy10() + testCopy15() + testCopy16() + testCopy17() + testCopy23() + testCopy24() + testCopy25() + testCopy31() + testCopy32() + testCopy33() + testCopy63() + testCopy64() + testCopy65() + testCopy1023() + testCopy1024() + testCopy1025() + testCopy1031() + testCopy1032() + testCopy1033() + testCopy1039() + testCopy1040() + testCopy1041() + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/ctl_ssa.go b/src/cmd/compile/internal/gc/testdata/ctl_ssa.go new file mode 100644 index 0000000000..09880ef94f --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/ctl_ssa.go @@ -0,0 +1,161 @@ +// run + +// 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 + +// 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() { + 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 { + print("nor(", a, ", ", b, ")=", want, " got ", got, "\n") + failed = true + } + } +} + +func emptyRange_ssa(b []byte) bool { + for _, x := range b { + _ = x + } + return true +} + +func testEmptyRange() { + if !emptyRange_ssa([]byte{}) { + println("emptyRange_ssa([]byte{})=false, want true") + failed = 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() { + for i := 0; i < 6; i++ { + if got := fallthrough_ssa(i); got != i { + println("fallthrough_ssa(i) =", got, "wanted", i) + failed = true + } + } +} + +func testSwitch() { + for i := 0; i < 6; i++ { + if got := switch_ssa(i); got != i { + println("switch_ssa(i) =", got, "wanted", i) + failed = true + } + } +} + +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. +func flagOverwrite_ssa(s *junk, c int) int { + switch { + } + 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() { + j := junk{} + if got := flagOverwrite_ssa(&j, ' '); got != 3 { + println("flagOverwrite_ssa =", got, "wanted 3") + failed = true + } +} + +var failed = false + +func main() { + testPhiControl() + testEmptyRange() + + testSwitch() + testFallthrough() + + testFlagOverwrite() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/deferNoReturn_ssa.go b/src/cmd/compile/internal/gc/testdata/deferNoReturn_ssa.go new file mode 100644 index 0000000000..7578dd56f2 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/deferNoReturn_ssa.go @@ -0,0 +1,17 @@ +// compile + +// 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 foo + +func deferNoReturn_ssa() { + defer func() { println("returned") }() + for { + println("loop") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/fp_ssa.go b/src/cmd/compile/internal/gc/testdata/fp_ssa.go new file mode 100644 index 0000000000..cfbdcda251 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/fp_ssa.go @@ -0,0 +1,1741 @@ +// run + +// 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" + +// 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). +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) { + switch { + } + 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. +func fpspill_ssa(a int) float64 { + switch { + } + + 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 +} + +func add64_ssa(a, b float64) float64 { + switch { + } + return a + b +} + +func mul64_ssa(a, b float64) float64 { + switch { + } + return a * b +} + +func sub64_ssa(a, b float64) float64 { + switch { + } + return a - b +} + +func div64_ssa(a, b float64) float64 { + switch { + } + return a / b +} + +func neg64_ssa(a, b float64) float64 { + switch { + } + return -a + -1*b +} + +func add32_ssa(a, b float32) float32 { + switch { + } + return a + b +} + +func mul32_ssa(a, b float32) float32 { + switch { + } + return a * b +} + +func sub32_ssa(a, b float32) float32 { + switch { + } + return a - b +} +func div32_ssa(a, b float32) float32 { + switch { + } + return a / b +} + +func neg32_ssa(a, b float32) float32 { + switch { + } + return -a + -1*b +} + +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) { + switch { + } + 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 +} + +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) { + switch { + } + 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() int { + fails := 0 + { + a, b, c, d, e, f, g, h, i := conv2Float64_ssa(0, 0, 0, 0, 0, 0, 0, 0, 0) + fails += expectAll64("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) + fails += expectAll64("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) + fails += expectAll32("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) + fails += expectAll32("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) + fails += expect64("a", a, 127) + fails += expect64("b", b, 255) + fails += expect64("c", c, 32767) + fails += expect64("d", d, 65535) + fails += expect64("e", e, float64(int32(0x7fffffff))) + fails += expect64("f", f, float64(uint32(0xffffffff))) + fails += expect64("g", g, float64(int64(0x7fffffffffffffff))) + fails += expect64("h", h, float64(uint64(0xffffffffffffffff))) + fails += expect64("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) + fails += expect64("a", a, -128) + fails += expect64("b", b, 254) + fails += expect64("c", c, -32768) + fails += expect64("d", d, 65534) + fails += expect64("e", e, float64(^int32(0x7fffffff))) + fails += expect64("f", f, float64(uint32(0xfffffffe))) + fails += expect64("g", g, float64(^int64(0x7fffffffffffffff))) + fails += expect64("h", h, float64(uint64(0xfffffffffffff401))) + fails += expect64("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) + fails += expect32("a", a, 127) + fails += expect32("b", b, 255) + fails += expect32("c", c, 32767) + fails += expect32("d", d, 65535) + fails += expect32("e", e, float32(int32(0x7fffffff))) + fails += expect32("f", f, float32(uint32(0xffffffff))) + fails += expect32("g", g, float32(int64(0x7fffffffffffffff))) + fails += expect32("h", h, float32(uint64(0xffffffffffffffff))) + fails += expect32("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) + fails += expect32("a", a, -128) + fails += expect32("b", b, 254) + fails += expect32("c", c, -32768) + fails += expect32("d", d, 65534) + fails += expect32("e", e, float32(^int32(0x7fffffff))) + fails += expect32("f", f, float32(uint32(0xfffffffe))) + fails += expect32("g", g, float32(^int64(0x7fffffffffffffff))) + fails += expect32("h", h, float32(uint64(0xfffffffffffff401))) + fails += expect32("i", i, float32(float64(1.5E-45))) + } + return fails +} + +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 +) + +func compares64_ssa(a, b, c, d float64) (lt, le, eq, ne, ge, gt uint64) { + + switch { + } + + 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 +} + +func compares32_ssa(a, b, c, d float32) (lt, le, eq, ne, ge, gt uint64) { + + switch { + } + + 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 +} + +func le64_ssa(x, y float64) bool { + switch { + } + return x <= y +} +func ge64_ssa(x, y float64) bool { + switch { + } + return x >= y +} +func lt64_ssa(x, y float64) bool { + switch { + } + return x < y +} +func gt64_ssa(x, y float64) bool { + switch { + } + return x > y +} +func eq64_ssa(x, y float64) bool { + switch { + } + return x == y +} +func ne64_ssa(x, y float64) bool { + switch { + } + return x != y +} + +func eqbr64_ssa(x, y float64) float64 { + switch { + } + if x == y { + return 17 + } + return 42 +} +func nebr64_ssa(x, y float64) float64 { + switch { + } + if x != y { + return 17 + } + return 42 +} +func gebr64_ssa(x, y float64) float64 { + switch { + } + if x >= y { + return 17 + } + return 42 +} +func lebr64_ssa(x, y float64) float64 { + switch { + } + if x <= y { + return 17 + } + return 42 +} +func ltbr64_ssa(x, y float64) float64 { + switch { + } + if x < y { + return 17 + } + return 42 +} +func gtbr64_ssa(x, y float64) float64 { + switch { + } + if x > y { + return 17 + } + return 42 +} + +func le32_ssa(x, y float32) bool { + switch { + } + return x <= y +} +func ge32_ssa(x, y float32) bool { + switch { + } + return x >= y +} +func lt32_ssa(x, y float32) bool { + switch { + } + return x < y +} +func gt32_ssa(x, y float32) bool { + switch { + } + return x > y +} +func eq32_ssa(x, y float32) bool { + switch { + } + return x == y +} +func ne32_ssa(x, y float32) bool { + switch { + } + return x != y +} + +func eqbr32_ssa(x, y float32) float32 { + switch { + } + if x == y { + return 17 + } + return 42 +} +func nebr32_ssa(x, y float32) float32 { + switch { + } + if x != y { + return 17 + } + return 42 +} +func gebr32_ssa(x, y float32) float32 { + switch { + } + if x >= y { + return 17 + } + return 42 +} +func lebr32_ssa(x, y float32) float32 { + switch { + } + if x <= y { + return 17 + } + return 42 +} +func ltbr32_ssa(x, y float32) float32 { + switch { + } + if x < y { + return 17 + } + return 42 +} +func gtbr32_ssa(x, y float32) float32 { + switch { + } + if x > y { + return 17 + } + return 42 +} + +func F32toU8_ssa(x float32) uint8 { + switch { + } + return uint8(x) +} + +func F32toI8_ssa(x float32) int8 { + switch { + } + return int8(x) +} + +func F32toU16_ssa(x float32) uint16 { + switch { + } + return uint16(x) +} + +func F32toI16_ssa(x float32) int16 { + switch { + } + return int16(x) +} + +func F32toU32_ssa(x float32) uint32 { + switch { + } + return uint32(x) +} + +func F32toI32_ssa(x float32) int32 { + switch { + } + return int32(x) +} + +func F32toU64_ssa(x float32) uint64 { + switch { + } + return uint64(x) +} + +func F32toI64_ssa(x float32) int64 { + switch { + } + return int64(x) +} + +func F64toU8_ssa(x float64) uint8 { + switch { + } + return uint8(x) +} + +func F64toI8_ssa(x float64) int8 { + switch { + } + return int8(x) +} + +func F64toU16_ssa(x float64) uint16 { + switch { + } + return uint16(x) +} + +func F64toI16_ssa(x float64) int16 { + switch { + } + return int16(x) +} + +func F64toU32_ssa(x float64) uint32 { + switch { + } + return uint32(x) +} + +func F64toI32_ssa(x float64) int32 { + switch { + } + return int32(x) +} + +func F64toU64_ssa(x float64) uint64 { + switch { + } + return uint64(x) +} + +func F64toI64_ssa(x float64) int64 { + switch { + } + return int64(x) +} + +func floatsToInts(x float64, expected int64) int { + y := float32(x) + fails := 0 + fails += expectInt64("F64toI8", int64(F64toI8_ssa(x)), expected) + fails += expectInt64("F64toI16", int64(F64toI16_ssa(x)), expected) + fails += expectInt64("F64toI32", int64(F64toI32_ssa(x)), expected) + fails += expectInt64("F64toI64", int64(F64toI64_ssa(x)), expected) + fails += expectInt64("F32toI8", int64(F32toI8_ssa(y)), expected) + fails += expectInt64("F32toI16", int64(F32toI16_ssa(y)), expected) + fails += expectInt64("F32toI32", int64(F32toI32_ssa(y)), expected) + fails += expectInt64("F32toI64", int64(F32toI64_ssa(y)), expected) + return fails +} + +func floatsToUints(x float64, expected uint64) int { + y := float32(x) + fails := 0 + fails += expectUint64("F64toU8", uint64(F64toU8_ssa(x)), expected) + fails += expectUint64("F64toU16", uint64(F64toU16_ssa(x)), expected) + fails += expectUint64("F64toU32", uint64(F64toU32_ssa(x)), expected) + fails += expectUint64("F64toU64", uint64(F64toU64_ssa(x)), expected) + fails += expectUint64("F32toU8", uint64(F32toU8_ssa(y)), expected) + fails += expectUint64("F32toU16", uint64(F32toU16_ssa(y)), expected) + fails += expectUint64("F32toU32", uint64(F32toU32_ssa(y)), expected) + fails += expectUint64("F32toU64", uint64(F32toU64_ssa(y)), expected) + return fails +} + +func floatingToIntegerConversionsTest() int { + fails := 0 + fails += floatsToInts(0.0, 0) + fails += floatsToInts(0.5, 0) + fails += floatsToInts(0.9, 0) + fails += floatsToInts(1.0, 1) + fails += floatsToInts(1.5, 1) + fails += floatsToInts(127.0, 127) + fails += floatsToInts(-1.0, -1) + fails += floatsToInts(-128.0, -128) + + fails += floatsToUints(0.0, 0) + fails += floatsToUints(1.0, 1) + fails += floatsToUints(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) + fails += expectUint64("2**62...", F32toU64_ssa(f), w) + fails += expectUint64("2**62...", F64toU64_ssa(d), w) + fails += expectInt64("2**62...", F32toI64_ssa(f), v) + fails += expectInt64("2**62...", F64toI64_ssa(d), v) + fails += expectInt64("2**62...", F32toI64_ssa(-f), -v) + fails += expectInt64("2**62...", F64toI64_ssa(-d), -v) + w += w + f += f + d += d + fails += expectUint64("2**63...", F32toU64_ssa(f), w) + fails += expectUint64("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) + fails += expectUint32("2**30...", F32toU32_ssa(f), w) + fails += expectUint32("2**30...", F64toU32_ssa(d), w) + fails += expectInt32("2**30...", F32toI32_ssa(f), v) + fails += expectInt32("2**30...", F64toI32_ssa(d), v) + fails += expectInt32("2**30...", F32toI32_ssa(-f), -v) + fails += expectInt32("2**30...", F64toI32_ssa(-d), -v) + w += w + f += f + d += d + fails += expectUint32("2**31...", F32toU32_ssa(f), w) + fails += expectUint32("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) + fails += expectUint16("2**14...", F32toU16_ssa(f), w) + fails += expectUint16("2**14...", F64toU16_ssa(d), w) + fails += expectInt16("2**14...", F32toI16_ssa(f), v) + fails += expectInt16("2**14...", F64toI16_ssa(d), v) + fails += expectInt16("2**14...", F32toI16_ssa(-f), -v) + fails += expectInt16("2**14...", F64toI16_ssa(-d), -v) + w += w + f += f + d += d + fails += expectUint16("2**15...", F32toU16_ssa(f), w) + fails += expectUint16("2**15...", F64toU16_ssa(d), w) + } + + fails += expectInt32("-2147483648", F32toI32_ssa(-2147483648), -2147483648) + + fails += expectInt32("-2147483648", F64toI32_ssa(-2147483648), -2147483648) + fails += expectInt32("-2147483647", F64toI32_ssa(-2147483647), -2147483647) + fails += expectUint32("4294967295", F64toU32_ssa(4294967295), 4294967295) + + fails += expectInt16("-32768", F64toI16_ssa(-32768), -32768) + fails += expectInt16("-32768", F32toI16_ssa(-32768), -32768) + + // NB more of a pain to do these for 32-bit because of lost bits in Float32 mantissa + fails += expectInt16("32767", F64toI16_ssa(32767), 32767) + fails += expectInt16("32767", F32toI16_ssa(32767), 32767) + fails += expectUint16("32767", F64toU16_ssa(32767), 32767) + fails += expectUint16("32767", F32toU16_ssa(32767), 32767) + fails += expectUint16("65535", F64toU16_ssa(65535), 65535) + fails += expectUint16("65535", F32toU16_ssa(65535), 65535) + + return fails +} + +func fail64(s string, f func(a, b float64) float64, a, b, e float64) int { + d := f(a, b) + if d != e { + fmt.Printf("For (float64) %v %v %v, expected %v, got %v\n", a, s, b, e, d) + return 1 + } + return 0 +} + +func fail64bool(s string, f func(a, b float64) bool, a, b float64, e bool) int { + d := f(a, b) + if d != e { + fmt.Printf("For (float64) %v %v %v, expected %v, got %v\n", a, s, b, e, d) + return 1 + } + return 0 +} + +func fail32(s string, f func(a, b float32) float32, a, b, e float32) int { + d := f(a, b) + if d != e { + fmt.Printf("For (float32) %v %v %v, expected %v, got %v\n", a, s, b, e, d) + return 1 + } + return 0 +} + +func fail32bool(s string, f func(a, b float32) bool, a, b float32, e bool) int { + d := f(a, b) + if d != e { + fmt.Printf("For (float32) %v %v %v, expected %v, got %v\n", a, s, b, e, d) + return 1 + } + return 0 +} + +func expect64(s string, x, expected float64) int { + if x != expected { + println("F64 Expected", expected, "for", s, ", got", x) + return 1 + } + return 0 +} + +func expect32(s string, x, expected float32) int { + if x != expected { + println("F32 Expected", expected, "for", s, ", got", x) + return 1 + } + return 0 +} + +func expectUint64(s string, x, expected uint64) int { + if x != expected { + fmt.Printf("U64 Expected 0x%016x for %s, got 0x%016x\n", expected, s, x) + return 1 + } + return 0 +} + +func expectInt64(s string, x, expected int64) int { + if x != expected { + fmt.Printf("%s: Expected 0x%016x, got 0x%016x\n", s, expected, x) + return 1 + } + return 0 +} + +func expectUint32(s string, x, expected uint32) int { + if x != expected { + fmt.Printf("U32 %s: Expected 0x%08x, got 0x%08x\n", s, expected, x) + return 1 + } + return 0 +} + +func expectInt32(s string, x, expected int32) int { + if x != expected { + fmt.Printf("I32 %s: Expected 0x%08x, got 0x%08x\n", s, expected, x) + return 1 + } + return 0 +} + +func expectUint16(s string, x, expected uint16) int { + if x != expected { + fmt.Printf("U16 %s: Expected 0x%04x, got 0x%04x\n", s, expected, x) + return 1 + } + return 0 +} + +func expectInt16(s string, x, expected int16) int { + if x != expected { + fmt.Printf("I16 %s: Expected 0x%04x, got 0x%04x\n", s, expected, x) + return 1 + } + return 0 +} + +func expectAll64(s string, expected, a, b, c, d, e, f, g, h, i float64) int { + fails := 0 + fails += expect64(s+":a", a, expected) + fails += expect64(s+":b", b, expected) + fails += expect64(s+":c", c, expected) + fails += expect64(s+":d", d, expected) + fails += expect64(s+":e", e, expected) + fails += expect64(s+":f", f, expected) + fails += expect64(s+":g", g, expected) + return fails +} + +func expectAll32(s string, expected, a, b, c, d, e, f, g, h, i float32) int { + fails := 0 + fails += expect32(s+":a", a, expected) + fails += expect32(s+":b", b, expected) + fails += expect32(s+":c", c, expected) + fails += expect32(s+":d", d, expected) + fails += expect32(s+":e", e, expected) + fails += expect32(s+":f", f, expected) + fails += expect32(s+":g", g, expected) + return fails +} + +var ev64 [2]float64 = [2]float64{42.0, 17.0} +var ev32 [2]float32 = [2]float32{42.0, 17.0} + +func cmpOpTest(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) int { + fails := 0 + fails += fail64bool(s, f, zero, zero, result>>16&1 == 1) + fails += fail64bool(s, f, zero, one, result>>12&1 == 1) + fails += fail64bool(s, f, zero, inf, result>>8&1 == 1) + fails += fail64bool(s, f, zero, nan, result>>4&1 == 1) + fails += fail64bool(s, f, nan, nan, result&1 == 1) + + fails += fail64(s, g, zero, zero, ev64[result>>16&1]) + fails += fail64(s, g, zero, one, ev64[result>>12&1]) + fails += fail64(s, g, zero, inf, ev64[result>>8&1]) + fails += fail64(s, g, zero, nan, ev64[result>>4&1]) + fails += fail64(s, g, nan, nan, ev64[result>>0&1]) + + { + zero := float32(zero) + one := float32(one) + inf := float32(inf) + nan := float32(nan) + fails += fail32bool(s, ff, zero, zero, (result>>16)&1 == 1) + fails += fail32bool(s, ff, zero, one, (result>>12)&1 == 1) + fails += fail32bool(s, ff, zero, inf, (result>>8)&1 == 1) + fails += fail32bool(s, ff, zero, nan, (result>>4)&1 == 1) + fails += fail32bool(s, ff, nan, nan, result&1 == 1) + + fails += fail32(s, gg, zero, zero, ev32[(result>>16)&1]) + fails += fail32(s, gg, zero, one, ev32[(result>>12)&1]) + fails += fail32(s, gg, zero, inf, ev32[(result>>8)&1]) + fails += fail32(s, gg, zero, nan, ev32[(result>>4)&1]) + fails += fail32(s, gg, nan, nan, ev32[(result>>0)&1]) + } + + return fails +} + +func expectCx128(s string, x, expected complex128) int { + if x != expected { + println("Cx 128 Expected", expected, "for", s, ", got", x) + return 1 + } + return 0 +} + +func expectCx64(s string, x, expected complex64) int { + if x != expected { + println("Cx 64 Expected", expected, "for", s, ", got", x) + return 1 + } + return 0 +} + +//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(s string, b bool) int { + if !b { + println("expected true for", s, ", got false") + return 1 + } + return 0 +} +func expectFalse(s string, b bool) int { + if b { + println("expected false for", s, ", got true") + return 1 + } + return 0 +} + +func complexTest128() int { + fails := 0 + 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) + + fails += expectCx128("sum", sum, 4+8i) + fails += expectCx128("diff", diff, 2+4i) + fails += expectCx128("prod", prod, -9+12i) + fails += expectCx128("quot", quot, 3+0i) + fails += expectCx128("neg", neg, -1-2i) + fails += expect64("real", r, 1) + fails += expect64("imag", i, 2) + fails += expectCx128("cnst", cnst, -4+7i) + fails += expectTrue(fmt.Sprintf("%v==%v", a, a), c1) + fails += expectFalse(fmt.Sprintf("%v==%v", a, b), c2) + fails += expectFalse(fmt.Sprintf("%v!=%v", a, a), c3) + fails += expectTrue(fmt.Sprintf("%v!=%v", a, b), c4) + + return fails +} + +func complexTest64() int { + fails := 0 + 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) + + fails += expectCx64("sum", sum, 4+8i) + fails += expectCx64("diff", diff, 2+4i) + fails += expectCx64("prod", prod, -9+12i) + fails += expectCx64("quot", quot, 3+0i) + fails += expectCx64("neg", neg, -1-2i) + fails += expect32("real", r, 1) + fails += expect32("imag", i, 2) + fails += expectTrue(fmt.Sprintf("%v==%v", a, a), c1) + fails += expectFalse(fmt.Sprintf("%v==%v", a, b), c2) + fails += expectFalse(fmt.Sprintf("%v!=%v", a, a), c3) + fails += expectTrue(fmt.Sprintf("%v!=%v", a, b), c4) + + return fails +} + +func main() { + + 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 + + fails := 0 + fails += fail64("+", add64_ssa, a, b, 7.0) + fails += fail64("*", mul64_ssa, a, b, 12.0) + fails += fail64("-", sub64_ssa, a, b, -1.0) + fails += fail64("/", div64_ssa, a, b, 0.75) + fails += fail64("neg", neg64_ssa, a, b, -7) + + fails += fail32("+", add32_ssa, c, d, 7.0) + fails += fail32("*", mul32_ssa, c, d, 12.0) + fails += fail32("-", sub32_ssa, c, d, -1.0) + fails += fail32("/", div32_ssa, c, d, 0.75) + fails += fail32("neg", neg32_ssa, c, d, -7) + + // denorm-squared should underflow to zero. + fails += fail32("*", mul32_ssa, tiny, tiny, 0) + + // but should not underflow in float and in fact is exactly representable. + fails += 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) + + fails += expect64("aa", aa, 11.0) + fails += expect64("ab", ab, 900.0) + fails += expect64("ac", ac, 990.0) + fails += expect64("ad", ad, 999.0) + + fails += expect64("ba", ba, -900.0) + fails += expect64("bb", bb, 22.0) + fails += expect64("bc", bc, 90.0) + fails += expect64("bd", bd, 99.0) + + fails += expect64("ca", ca, -990.0) + fails += expect64("cb", cb, -90.0) + fails += expect64("cc", cc, 33.0) + fails += expect64("cd", cd, 9.0) + + fails += expect64("da", da, -999.0) + fails += expect64("db", db, -99.0) + fails += expect64("dc", dc, -9.0) + fails += expect64("dd", dd, 44.0) + + fails += integer2floatConversions() + + var zero64 float64 = 0.0 + var one64 float64 = 1.0 + var inf64 float64 = 1.0 / zero64 + var nan64 float64 = sub64_ssa(inf64, inf64) + + fails += cmpOpTest("!=", ne64_ssa, nebr64_ssa, ne32_ssa, nebr32_ssa, zero64, one64, inf64, nan64, 0x01111) + fails += cmpOpTest("==", eq64_ssa, eqbr64_ssa, eq32_ssa, eqbr32_ssa, zero64, one64, inf64, nan64, 0x10000) + fails += cmpOpTest("<=", le64_ssa, lebr64_ssa, le32_ssa, lebr32_ssa, zero64, one64, inf64, nan64, 0x11100) + fails += cmpOpTest("<", lt64_ssa, ltbr64_ssa, lt32_ssa, ltbr32_ssa, zero64, one64, inf64, nan64, 0x01100) + fails += cmpOpTest(">", gt64_ssa, gtbr64_ssa, gt32_ssa, gtbr32_ssa, zero64, one64, inf64, nan64, 0x00000) + fails += cmpOpTest(">=", 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) + fails += expectUint64("lt", lt, 0x0110001000000000) + fails += expectUint64("le", le, 0x1110011000100000) + fails += expectUint64("eq", eq, 0x1000010000100000) + fails += expectUint64("ne", ne, 0x0111101111011111) + fails += expectUint64("ge", ge, 0x1000110011100000) + fails += expectUint64("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)) + fails += expectUint64("lt", lt, 0x0110001000000000) + fails += expectUint64("le", le, 0x1110011000100000) + fails += expectUint64("eq", eq, 0x1000010000100000) + fails += expectUint64("ne", ne, 0x0111101111011111) + fails += expectUint64("ge", ge, 0x1000110011100000) + fails += expectUint64("gt", gt, 0x0000100011000000) + } + + fails += floatingToIntegerConversionsTest() + fails += complexTest128() + fails += complexTest64() + + if fails > 0 { + fmt.Printf("Saw %v failures\n", fails) + panic("Failed.") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/gen/arithBoundaryGen.go b/src/cmd/compile/internal/gc/testdata/gen/arithBoundaryGen.go new file mode 100644 index 0000000000..7c7d721a23 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/gen/arithBoundaryGen.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. + +// 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_ssa.go +// will be written into the parent directory containing the tests + +package main + +import ( + "bytes" + "fmt" + "go/format" + "io/ioutil" + "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, "package main;\n") + fmt.Fprintf(w, "import \"fmt\"\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, "var failed bool\n\n") + fmt.Fprintf(w, "func main() {\n\n") + + verify, err := template.New("tst").Parse( + `if got := {{.Name}}_{{.Stype}}_ssa(v.a, v.b); got != v.{{.Name}} { + fmt.Printf("{{.Name}}_{{.Stype}} %d{{.Symbol}}%d = %d, wanted %d\n",v.a,v.b,got,v.{{.Name}}) + failed = true +} +`) + + 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, `if failed { + panic("tests failed") + } +`) + 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 = ioutil.WriteFile("../arithBoundary_ssa.go", src, 0666) + if err != nil { + log.Fatalf("can't write output: %v\n", err) + } +} diff --git a/src/cmd/compile/internal/gc/testdata/gen/arithConstGen.go b/src/cmd/compile/internal/gc/testdata/gen/arithConstGen.go new file mode 100644 index 0000000000..34e54ad08a --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/gen/arithConstGen.go @@ -0,0 +1,294 @@ +// 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_ssa.go +// will be written into the parent directory containing the tests + +package main + +import ( + "bytes" + "fmt" + "go/format" + "io/ioutil" + "log" + "strings" + "text/template" +) + +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{op{"add", "+"}, op{"sub", "-"}, op{"div", "/"}, op{"mul", "*"}, + op{"lsh", "<<"}, op{"rsh", ">>"}} + +// 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 "<<": + 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 "<<": + 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, "package main;\n") + fmt.Fprintf(w, "import \"fmt\"\n") + + fncCnst1, err := template.New("fnc").Parse( + `//go:noinline + func {{.Name}}_{{.Type_}}_{{.FNumber}}_ssa(a {{.Type_}}) {{.Type_}} { + return a {{.Symbol}} {{.Number}} +} +`) + if err != nil { + panic(err) + } + fncCnst2, err := template.New("fnc").Parse( + `//go:noinline + func {{.Name}}_{{.FNumber}}_{{.Type_}}_ssa(a {{.Type_}}) {{.Type_}} { + return {{.Number}} {{.Symbol}} a +} + +`) + if err != nil { + panic(err) + } + + type fncData struct { + Name, Type_, Symbol, FNumber, Number string + } + + for _, s := range szs { + for _, o := range ops { + 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 != "div" || i != 0 { + fncCnst1.Execute(w, fd) + } + + 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 != "div" || i != 0 { + fncCnst1.Execute(w, fd) + } + fncCnst2.Execute(w, fd) + } + } + } + } + + fmt.Fprintf(w, "var failed bool\n\n") + fmt.Fprintf(w, "func main() {\n\n") + + vrf1, _ := template.New("vrf1").Parse(` + if got := {{.Name}}_{{.FNumber}}_{{.Type_}}_ssa({{.Input}}); got != {{.Ans}} { + fmt.Printf("{{.Name}}_{{.Type_}} {{.Number}}{{.Symbol}}{{.Input}} = %d, wanted {{.Ans}}\n",got) + failed = true + } +`) + + vrf2, _ := template.New("vrf2").Parse(` + if got := {{.Name}}_{{.Type_}}_{{.FNumber}}_ssa({{.Input}}); got != {{.Ans}} { + fmt.Printf("{{.Name}}_{{.Type_}} {{.Input}}{{.Symbol}}{{.Number}} = %d, wanted {{.Ans}}\n",got) + failed = true + } +`) + + type cfncData struct { + Name, Type_, Symbol, FNumber, Number string + Ans, Input string + } + for _, s := range szs { + if len(s.u) > 0 { + for _, o := range ops { + fd := cfncData{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 != "div" || j != 0 { + fd.Ans = ansU(i, j, s.name, o.symbol) + fd.Input = fmt.Sprintf("%d", j) + err = vrf1.Execute(w, fd) + if err != nil { + panic(err) + } + } + + if o.name != "div" || i != 0 { + fd.Ans = ansU(j, i, s.name, o.symbol) + fd.Input = fmt.Sprintf("%d", j) + err = vrf2.Execute(w, fd) + if err != nil { + panic(err) + } + } + + } + } + + } + } + + // signed + if len(s.i) > 0 { + for _, o := range ops { + // don't generate tests for shifts by signed integers + if o.name == "lsh" || o.name == "rsh" { + continue + } + fd := cfncData{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 != "div" || j != 0 { + fd.Ans = ansS(i, j, s.name, o.symbol) + fd.Input = fmt.Sprintf("%d", j) + err = vrf1.Execute(w, fd) + if err != nil { + panic(err) + } + } + + if o.name != "div" || i != 0 { + fd.Ans = ansS(j, i, s.name, o.symbol) + fd.Input = fmt.Sprintf("%d", j) + err = vrf2.Execute(w, fd) + if err != nil { + panic(err) + } + } + + } + } + + } + } + } + + fmt.Fprintf(w, `if failed { + panic("tests failed") + } +`) + 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 = ioutil.WriteFile("../arithConst_ssa.go", src, 0666) + if err != nil { + log.Fatalf("can't write output: %v\n", err) + } +} diff --git a/src/cmd/compile/internal/gc/testdata/gen/copyGen.go b/src/cmd/compile/internal/gc/testdata/gen/copyGen.go new file mode 100644 index 0000000000..a699fac6c0 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/gen/copyGen.go @@ -0,0 +1,93 @@ +// 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" + "io/ioutil" + "log" +) + +// 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_ssa.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} + +func main() { + w := new(bytes.Buffer) + fmt.Fprintf(w, "// run\n") + fmt.Fprintf(w, "// autogenerated from gen/copyGen.go - do not edit!\n") + fmt.Fprintf(w, "package main\n") + fmt.Fprintf(w, "import \"fmt\"\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, "func t%dcopy_ssa(y, x *[%d]byte) {\n", s, s) + fmt.Fprintf(w, " switch{}\n") + fmt.Fprintf(w, " *y = *x\n") + fmt.Fprintf(w, "}\n") + + // testing harness + fmt.Fprintf(w, "func testCopy%d() {\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, " fmt.Printf(\"t%dcopy got=%%v, want %%v\\n\", a, want)\n", s) + fmt.Fprintf(w, " failed=true\n") + fmt.Fprintf(w, " }\n") + fmt.Fprintf(w, "}\n") + } + + // boilerplate at end + fmt.Fprintf(w, "var failed bool\n") + fmt.Fprintf(w, "func main() {\n") + for _, s := range sizes { + fmt.Fprintf(w, " testCopy%d()\n", s) + } + fmt.Fprintf(w, " if failed {\n") + fmt.Fprintf(w, " panic(\"failed\")\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 = ioutil.WriteFile("../copy_ssa.go", src, 0666) + if err != nil { + log.Fatalf("can't write output: %v\n", err) + } +} diff --git a/src/cmd/compile/internal/gc/testdata/gen/zeroGen.go b/src/cmd/compile/internal/gc/testdata/gen/zeroGen.go new file mode 100644 index 0000000000..90e8029f3f --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/gen/zeroGen.go @@ -0,0 +1,88 @@ +// 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" + "io/ioutil" + "log" +) + +// 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_ssa.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} + +func main() { + w := new(bytes.Buffer) + fmt.Fprintf(w, "// run\n") + fmt.Fprintf(w, "// autogenerated from gen/zeroGen.go - do not edit!\n") + fmt.Fprintf(w, "package main\n") + fmt.Fprintf(w, "import \"fmt\"\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, "func zero%d_ssa(x *[%d]byte) {\n", s, s) + fmt.Fprintf(w, " switch{}\n") + fmt.Fprintf(w, " *x = [%d]byte{}\n", s) + fmt.Fprintf(w, "}\n") + + // testing harness + fmt.Fprintf(w, "func testZero%d() {\n", s) + fmt.Fprintf(w, " a := T%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 := T%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, " fmt.Printf(\"zero%d got=%%v, want %%v\\n\", a, want)\n", s) + fmt.Fprintf(w, " failed=true\n") + fmt.Fprintf(w, " }\n") + fmt.Fprintf(w, "}\n") + } + + // boilerplate at end + fmt.Fprintf(w, "var failed bool\n") + fmt.Fprintf(w, "func main() {\n") + for _, s := range sizes { + fmt.Fprintf(w, " testZero%d()\n", s) + } + fmt.Fprintf(w, " if failed {\n") + fmt.Fprintf(w, " panic(\"failed\")\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 = ioutil.WriteFile("../zero_ssa.go", src, 0666) + if err != nil { + log.Fatalf("can't write output: %v\n", err) + } +} diff --git a/src/cmd/compile/internal/gc/testdata/loadstore_ssa.go b/src/cmd/compile/internal/gc/testdata/loadstore_ssa.go new file mode 100644 index 0000000000..e0b0b4dfab --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/loadstore_ssa.go @@ -0,0 +1,117 @@ +// run + +// 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 "fmt" + +// testLoadStoreOrder tests for reordering of stores/loads. +func testLoadStoreOrder() { + z := uint32(1000) + if testLoadStoreOrder_ssa(&z, 100) == 0 { + println("testLoadStoreOrder failed") + failed = true + } +} +func testLoadStoreOrder_ssa(z *uint32, prec uint) int { + switch { + } + old := *z // load + *z = uint32(prec) // store + if *z < old { // load + return 1 + } + return 0 +} + +func testStoreSize() { + a := [4]uint16{11, 22, 33, 44} + testStoreSize_ssa(&a[0], &a[2], 77) + want := [4]uint16{77, 22, 33, 44} + if a != want { + fmt.Println("testStoreSize failed. want =", want, ", got =", a) + failed = true + } +} +func testStoreSize_ssa(p *uint16, q *uint16, v uint32) { + switch { + } + // 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 + } +} + +var failed = false + +func testExtStore_ssa(p *byte, b bool) int { + switch { + } + x := *p + *p = 7 + if b { + return int(x) + } + return 0 +} + +func testExtStore() { + const start = 8 + var b byte = start + if got := testExtStore_ssa(&b, true); got != start { + fmt.Println("testExtStore failed. want =", start, ", got =", got) + failed = true + } +} + +var b int + +// testDeadStorePanic_ssa ensures that we don't optimize away stores +// that could be read by after recover(). Modeled after fixedbugs/issue1304. +func testDeadStorePanic_ssa(a int) (r int) { + switch { + } + 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() { + if want, got := 2, testDeadStorePanic_ssa(1); want != got { + fmt.Println("testDeadStorePanic failed. want =", want, ", got =", got) + failed = true + } +} + +func main() { + + testLoadStoreOrder() + testStoreSize() + testExtStore() + testDeadStorePanic() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/map_ssa.go b/src/cmd/compile/internal/gc/testdata/map_ssa.go new file mode 100644 index 0000000000..4a466003c7 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/map_ssa.go @@ -0,0 +1,45 @@ +// 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_ssa.go tests map operations. +package main + +import "fmt" + +var failed = false + +//go:noinline +func lenMap_ssa(v map[int]int) int { + return len(v) +} + +func testLenMap() { + + v := make(map[int]int) + v[0] = 0 + v[1] = 0 + v[2] = 0 + + if want, got := 3, lenMap_ssa(v); got != want { + fmt.Printf("expected len(map) = %d, got %d", want, got) + failed = true + } +} + +func testLenNilMap() { + + var v map[int]int + if want, got := 0, lenMap_ssa(v); got != want { + fmt.Printf("expected len(nil) = %d, got %d", want, got) + failed = true + } +} +func main() { + testLenMap() + testLenNilMap() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/phi_ssa.go b/src/cmd/compile/internal/gc/testdata/phi_ssa.go new file mode 100644 index 0000000000..e855070fc3 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/phi_ssa.go @@ -0,0 +1,103 @@ +// 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 ( + "fmt" + "runtime" +) + +// unfoldable true +var true_ = true + +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 true_ { + 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 main() { + want := int32(0) + got := foo() + if got != want { + fmt.Printf("want %d, got %d\n", want, got) + panic("bad") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/regalloc_ssa.go b/src/cmd/compile/internal/gc/testdata/regalloc_ssa.go new file mode 100644 index 0000000000..f752692952 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/regalloc_ssa.go @@ -0,0 +1,57 @@ +// run + +// 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 + +func phiOverwrite_ssa() int { + var n int + for i := 0; i < 10; i++ { + if i == 6 { + break + } + n = i + } + return n +} + +func phiOverwrite() { + want := 5 + got := phiOverwrite_ssa() + if got != want { + println("phiOverwrite_ssa()=", want, ", got", got) + failed = true + } +} + +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() { + want := 1 + got := phiOverwriteBig_ssa() + if got != want { + println("phiOverwriteBig_ssa()=", want, ", got", got) + failed = true + } +} + +var failed = false + +func main() { + phiOverwrite() + phiOverwriteBig() + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/short_ssa.go b/src/cmd/compile/internal/gc/testdata/short_ssa.go new file mode 100644 index 0000000000..fcec1baf09 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/short_ssa.go @@ -0,0 +1,60 @@ +// run + +// 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 + +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(arg1, arg2, wantRes bool) { testShortCircuit("AND", arg1, arg2, and_ssa, arg1, wantRes) } +func testOr(arg1, arg2, wantRes bool) { testShortCircuit("OR", arg1, arg2, or_ssa, !arg1, wantRes) } + +func testShortCircuit(opName string, arg1, arg2 bool, fn func(bool, bool) bool, wantRightCall, wantRes bool) { + rightCalled = false + got := fn(arg1, arg2) + if rightCalled != wantRightCall { + println("failed for", arg1, opName, arg2, "; rightCalled=", rightCalled, "want=", wantRightCall) + failed = true + } + if wantRes != got { + println("failed for", arg1, opName, arg2, "; res=", got, "want=", wantRes) + failed = true + } +} + +var failed = false + +func main() { + testAnd(false, false, false) + testAnd(false, true, false) + testAnd(true, false, false) + testAnd(true, true, true) + + testOr(false, false, false) + testOr(false, true, true) + testOr(true, false, true) + testOr(true, true, true) + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/string_ssa.go b/src/cmd/compile/internal/gc/testdata/string_ssa.go new file mode 100644 index 0000000000..a949fbcefb --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/string_ssa.go @@ -0,0 +1,161 @@ +// 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 + +var failed = false + +//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() { + 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, t := range tests { + if got := t.fn(t.s, t.low, t.high); t.want != got { + println("#", i, " ", t.s, "[", t.low, ":", t.high, "] = ", got, " want ", t.want) + failed = true + } + } +} + +type prefix struct { + prefix string +} + +func (p *prefix) slice_ssa() { + p.prefix = p.prefix[:3] +} + +func testStructSlice() { + switch { + } + p := &prefix{"prefix"} + p.slice_ssa() + if "pre" != p.prefix { + println("wrong field slice: wanted %s got %s", "pre", p.prefix) + failed = true + } +} + +func testStringSlicePanic() { + defer func() { + if r := recover(); r != nil { + println("paniced as expected") + } + }() + + str := "foobar" + println("got ", testStringSlice12_ssa(str, 3, 9)) + println("expected to panic, but didn't") + failed = true +} + +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() { + tests := []struct { + i int + want string + }{ + {0, "Below"}, + {1, "Exact"}, + {2, "Above"}, + } + + for i, t := range tests { + if got := testSmallIndexType_ssa(t.i); got != t.want { + println("#", i, "got ", got, ", wanted", t.want) + failed = true + } + } +} + +//go:noinline +func testStringElem_ssa(s string, i int) byte { + return s[i] +} + +func testStringElem() { + tests := []struct { + s string + i int + n byte + }{ + {"foobar", 3, 98}, + {"foobar", 0, 102}, + {"foobar", 5, 114}, + } + for _, t := range tests { + if got := testStringElem_ssa(t.s, t.i); got != t.n { + print("testStringElem \"", t.s, "\"[", t.i, "]=", got, ", wanted ", t.n, "\n") + failed = true + } + } +} + +//go:noinline +func testStringElemConst_ssa(i int) byte { + s := "foobar" + return s[i] +} + +func testStringElemConst() { + if got := testStringElemConst_ssa(3); got != 98 { + println("testStringElemConst=", got, ", wanted 98") + failed = true + } +} + +func main() { + testStringSlice() + testStringSlicePanic() + testStructSlice() + testSmallIndexType() + testStringElem() + testStringElemConst() + + if failed { + panic("failed") + } +} diff --git a/src/cmd/compile/internal/gc/testdata/unsafe_ssa.go b/src/cmd/compile/internal/gc/testdata/unsafe_ssa.go new file mode 100644 index 0000000000..d074eb1d5e --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/unsafe_ssa.go @@ -0,0 +1,148 @@ +// 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" + "runtime" + "unsafe" +) + +// global pointer slot +var a *[8]uint + +// unfoldable true +var b = 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 b { + 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 b { + 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 b { + 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 b { + z = y + } else { + z = 0 + } + return (*[7]uint)(unsafe.Pointer(z)) +} + +func testf() { + 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 { + fmt.Printf("%d:%x\n", i, c[i]) + panic("bad c") + } + } +} + +func testg() { + 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 { + fmt.Printf("%d:%x\n", i, c[i]) + panic("bad c") + } + } +} + +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() { + 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 { + fmt.Printf("alias_ssa: wanted %d, got %d\n", want, got) + panic("alias_ssa") + } +} + +func main() { + testf() + testg() + testdse() +} diff --git a/src/cmd/compile/internal/gc/testdata/zero_ssa.go b/src/cmd/compile/internal/gc/testdata/zero_ssa.go new file mode 100644 index 0000000000..0ec883b7f4 --- /dev/null +++ b/src/cmd/compile/internal/gc/testdata/zero_ssa.go @@ -0,0 +1,563 @@ +// run +// autogenerated from gen/zeroGen.go - do not edit! +package main + +import "fmt" + +type T1 struct { + pre [8]byte + mid [1]byte + post [8]byte +} + +func zero1_ssa(x *[1]byte) { + switch { + } + *x = [1]byte{} +} +func testZero1() { + a := T1{[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 := T1{[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 { + fmt.Printf("zero1 got=%v, want %v\n", a, want) + failed = true + } +} + +type T2 struct { + pre [8]byte + mid [2]byte + post [8]byte +} + +func zero2_ssa(x *[2]byte) { + switch { + } + *x = [2]byte{} +} +func testZero2() { + a := T2{[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 := T2{[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 { + fmt.Printf("zero2 got=%v, want %v\n", a, want) + failed = true + } +} + +type T3 struct { + pre [8]byte + mid [3]byte + post [8]byte +} + +func zero3_ssa(x *[3]byte) { + switch { + } + *x = [3]byte{} +} +func testZero3() { + a := T3{[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 := T3{[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 { + fmt.Printf("zero3 got=%v, want %v\n", a, want) + failed = true + } +} + +type T4 struct { + pre [8]byte + mid [4]byte + post [8]byte +} + +func zero4_ssa(x *[4]byte) { + switch { + } + *x = [4]byte{} +} +func testZero4() { + a := T4{[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 := T4{[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 { + fmt.Printf("zero4 got=%v, want %v\n", a, want) + failed = true + } +} + +type T5 struct { + pre [8]byte + mid [5]byte + post [8]byte +} + +func zero5_ssa(x *[5]byte) { + switch { + } + *x = [5]byte{} +} +func testZero5() { + a := T5{[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 := T5{[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 { + fmt.Printf("zero5 got=%v, want %v\n", a, want) + failed = true + } +} + +type T6 struct { + pre [8]byte + mid [6]byte + post [8]byte +} + +func zero6_ssa(x *[6]byte) { + switch { + } + *x = [6]byte{} +} +func testZero6() { + a := T6{[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 := T6{[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 { + fmt.Printf("zero6 got=%v, want %v\n", a, want) + failed = true + } +} + +type T7 struct { + pre [8]byte + mid [7]byte + post [8]byte +} + +func zero7_ssa(x *[7]byte) { + switch { + } + *x = [7]byte{} +} +func testZero7() { + a := T7{[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 := T7{[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 { + fmt.Printf("zero7 got=%v, want %v\n", a, want) + failed = true + } +} + +type T8 struct { + pre [8]byte + mid [8]byte + post [8]byte +} + +func zero8_ssa(x *[8]byte) { + switch { + } + *x = [8]byte{} +} +func testZero8() { + a := T8{[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 := T8{[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 { + fmt.Printf("zero8 got=%v, want %v\n", a, want) + failed = true + } +} + +type T9 struct { + pre [8]byte + mid [9]byte + post [8]byte +} + +func zero9_ssa(x *[9]byte) { + switch { + } + *x = [9]byte{} +} +func testZero9() { + a := T9{[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 := T9{[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 { + fmt.Printf("zero9 got=%v, want %v\n", a, want) + failed = true + } +} + +type T10 struct { + pre [8]byte + mid [10]byte + post [8]byte +} + +func zero10_ssa(x *[10]byte) { + switch { + } + *x = [10]byte{} +} +func testZero10() { + a := T10{[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 := T10{[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 { + fmt.Printf("zero10 got=%v, want %v\n", a, want) + failed = true + } +} + +type T15 struct { + pre [8]byte + mid [15]byte + post [8]byte +} + +func zero15_ssa(x *[15]byte) { + switch { + } + *x = [15]byte{} +} +func testZero15() { + a := T15{[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 := T15{[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 { + fmt.Printf("zero15 got=%v, want %v\n", a, want) + failed = true + } +} + +type T16 struct { + pre [8]byte + mid [16]byte + post [8]byte +} + +func zero16_ssa(x *[16]byte) { + switch { + } + *x = [16]byte{} +} +func testZero16() { + a := T16{[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 := T16{[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 { + fmt.Printf("zero16 got=%v, want %v\n", a, want) + failed = true + } +} + +type T17 struct { + pre [8]byte + mid [17]byte + post [8]byte +} + +func zero17_ssa(x *[17]byte) { + switch { + } + *x = [17]byte{} +} +func testZero17() { + a := T17{[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 := T17{[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 { + fmt.Printf("zero17 got=%v, want %v\n", a, want) + failed = true + } +} + +type T23 struct { + pre [8]byte + mid [23]byte + post [8]byte +} + +func zero23_ssa(x *[23]byte) { + switch { + } + *x = [23]byte{} +} +func testZero23() { + a := T23{[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 := T23{[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 { + fmt.Printf("zero23 got=%v, want %v\n", a, want) + failed = true + } +} + +type T24 struct { + pre [8]byte + mid [24]byte + post [8]byte +} + +func zero24_ssa(x *[24]byte) { + switch { + } + *x = [24]byte{} +} +func testZero24() { + a := T24{[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 := T24{[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 { + fmt.Printf("zero24 got=%v, want %v\n", a, want) + failed = true + } +} + +type T25 struct { + pre [8]byte + mid [25]byte + post [8]byte +} + +func zero25_ssa(x *[25]byte) { + switch { + } + *x = [25]byte{} +} +func testZero25() { + a := T25{[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 := T25{[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 { + fmt.Printf("zero25 got=%v, want %v\n", a, want) + failed = true + } +} + +type T31 struct { + pre [8]byte + mid [31]byte + post [8]byte +} + +func zero31_ssa(x *[31]byte) { + switch { + } + *x = [31]byte{} +} +func testZero31() { + a := T31{[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 := T31{[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 { + fmt.Printf("zero31 got=%v, want %v\n", a, want) + failed = true + } +} + +type T32 struct { + pre [8]byte + mid [32]byte + post [8]byte +} + +func zero32_ssa(x *[32]byte) { + switch { + } + *x = [32]byte{} +} +func testZero32() { + a := T32{[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 := T32{[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 { + fmt.Printf("zero32 got=%v, want %v\n", a, want) + failed = true + } +} + +type T33 struct { + pre [8]byte + mid [33]byte + post [8]byte +} + +func zero33_ssa(x *[33]byte) { + switch { + } + *x = [33]byte{} +} +func testZero33() { + a := T33{[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 := T33{[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 { + fmt.Printf("zero33 got=%v, want %v\n", a, want) + failed = true + } +} + +type T63 struct { + pre [8]byte + mid [63]byte + post [8]byte +} + +func zero63_ssa(x *[63]byte) { + switch { + } + *x = [63]byte{} +} +func testZero63() { + a := T63{[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 := T63{[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 { + fmt.Printf("zero63 got=%v, want %v\n", a, want) + failed = true + } +} + +type T64 struct { + pre [8]byte + mid [64]byte + post [8]byte +} + +func zero64_ssa(x *[64]byte) { + switch { + } + *x = [64]byte{} +} +func testZero64() { + a := T64{[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 := T64{[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 { + fmt.Printf("zero64 got=%v, want %v\n", a, want) + failed = true + } +} + +type T65 struct { + pre [8]byte + mid [65]byte + post [8]byte +} + +func zero65_ssa(x *[65]byte) { + switch { + } + *x = [65]byte{} +} +func testZero65() { + a := T65{[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 := T65{[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 { + fmt.Printf("zero65 got=%v, want %v\n", a, want) + failed = true + } +} + +type T1023 struct { + pre [8]byte + mid [1023]byte + post [8]byte +} + +func zero1023_ssa(x *[1023]byte) { + switch { + } + *x = [1023]byte{} +} +func testZero1023() { + a := T1023{[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 := T1023{[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 { + fmt.Printf("zero1023 got=%v, want %v\n", a, want) + failed = true + } +} + +type T1024 struct { + pre [8]byte + mid [1024]byte + post [8]byte +} + +func zero1024_ssa(x *[1024]byte) { + switch { + } + *x = [1024]byte{} +} +func testZero1024() { + a := T1024{[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 := T1024{[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 { + fmt.Printf("zero1024 got=%v, want %v\n", a, want) + failed = true + } +} + +type T1025 struct { + pre [8]byte + mid [1025]byte + post [8]byte +} + +func zero1025_ssa(x *[1025]byte) { + switch { + } + *x = [1025]byte{} +} +func testZero1025() { + a := T1025{[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 := T1025{[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 { + fmt.Printf("zero1025 got=%v, want %v\n", a, want) + failed = true + } +} + +var failed bool + +func main() { + testZero1() + testZero2() + testZero3() + testZero4() + testZero5() + testZero6() + testZero7() + testZero8() + testZero9() + testZero10() + testZero15() + testZero16() + testZero17() + testZero23() + testZero24() + testZero25() + testZero31() + testZero32() + testZero33() + testZero63() + testZero64() + testZero65() + testZero1023() + testZero1024() + testZero1025() + if failed { + panic("failed") + } +} |
