}
ft.update(b, v, v.Args[0], signed, r)
}
+ if x.max <= 0 && !signedAddOverflowsOrUnderflows(x.min, y.min, v.Type) {
+ r := lt
+ if !x.nonzero() {
+ r |= eq
+ }
+ ft.update(b, v, v.Args[1], signed, r)
+ }
+ if y.max <= 0 && !signedAddOverflowsOrUnderflows(x.min, y.min, v.Type) {
+ r := lt
+ if !y.nonzero() {
+ r |= eq
+ }
+ ft.update(b, v, v.Args[0], signed, r)
+ }
case OpAnd64, OpAnd32, OpAnd16, OpAnd8:
ft.update(b, v, v.Args[0], unsigned, lt|eq)
ft.update(b, v, v.Args[1], unsigned, lt|eq)
}
}
+func transitiveProofsThroughNonOverflowingSignedAddNegative(x, y, z int64) {
+ if x < math.MinInt64>>1 || x > 0 ||
+ y < math.MinInt64>>1 || y > 0 {
+ return
+ }
+
+ a := x + y
+ if a < z {
+ return
+ }
+
+ if x < z { // ERROR "Disproved Less64$"
+ return
+ }
+ if y < z { // ERROR "Disproved Less64$"
+ return
+ }
+ if a == x {
+ return
+ }
+ if a == y {
+ return
+ }
+
+ if x == 0 && y == 0 {
+ return
+ }
+ a = x + y
+ if a == x { // ERROR "Disproved Eq64$"
+ return
+ }
+ if a == y { // ERROR "Disproved Eq64$"
+ return
+ }
+}
+
+func transitiveProofsThroughOverflowingSignedAddNegative(x, y, z int64) {
+ if x >= 0 || y >= 0 {
+ return
+ }
+
+ a := x + y
+ if a < z {
+ return
+ }
+
+ if x < z {
+ return
+ }
+ if y < z {
+ return
+ }
+ if a == x {
+ return
+ }
+ if a == y {
+ return
+ }
+
+ x |= 1
+ y |= 1
+ a = x + y
+ if a == x {
+ return
+ }
+ if a == y {
+ return
+ }
+}
+
//go:noinline
func useInt(a int) {
}