//ft.update(b, v, v.Args[0], unsigned, gt|eq)
//ft.update(b, v, v.Args[1], unsigned, gt|eq)
case OpDiv64, OpDiv32, OpDiv16, OpDiv8:
- if ft.isNonNegative(v.Args[0]) && ft.isNonNegative(v.Args[1]) {
- ft.update(b, v, v.Args[0], unsigned, lt|eq)
+ if !ft.isNonNegative(v.Args[1]) {
+ break
}
+ fallthrough
+ case OpRsh8x64, OpRsh8x32, OpRsh8x16, OpRsh8x8,
+ OpRsh16x64, OpRsh16x32, OpRsh16x16, OpRsh16x8,
+ OpRsh32x64, OpRsh32x32, OpRsh32x16, OpRsh32x8,
+ OpRsh64x64, OpRsh64x32, OpRsh64x16, OpRsh64x8:
+ if !ft.isNonNegative(v.Args[0]) {
+ break
+ }
+ fallthrough
case OpDiv64u, OpDiv32u, OpDiv16u, OpDiv8u,
OpRsh8Ux64, OpRsh8Ux32, OpRsh8Ux16, OpRsh8Ux8,
OpRsh16Ux64, OpRsh16Ux32, OpRsh16Ux16, OpRsh16Ux8,
zl := ft.limits[z.ID]
var uminDivisor uint64
switch v.Op {
- case OpDiv64u, OpDiv32u, OpDiv16u, OpDiv8u:
+ case OpDiv64u, OpDiv32u, OpDiv16u, OpDiv8u,
+ OpDiv64, OpDiv32, OpDiv16, OpDiv8:
uminDivisor = zl.umin
case OpRsh8Ux64, OpRsh8Ux32, OpRsh8Ux16, OpRsh8Ux8,
OpRsh16Ux64, OpRsh16Ux32, OpRsh16Ux16, OpRsh16Ux8,
OpRsh32Ux64, OpRsh32Ux32, OpRsh32Ux16, OpRsh32Ux8,
- OpRsh64Ux64, OpRsh64Ux32, OpRsh64Ux16, OpRsh64Ux8:
+ OpRsh64Ux64, OpRsh64Ux32, OpRsh64Ux16, OpRsh64Ux8,
+ OpRsh8x64, OpRsh8x32, OpRsh8x16, OpRsh8x8,
+ OpRsh16x64, OpRsh16x32, OpRsh16x16, OpRsh16x8,
+ OpRsh32x64, OpRsh32x32, OpRsh32x16, OpRsh32x8,
+ OpRsh64x64, OpRsh64x32, OpRsh64x16, OpRsh64x8:
uminDivisor = 1 << zl.umin
default:
panic("unreachable")
func f10(a string) int {
n := len(a)
+ b := a[:n>>1] // ERROR "Proved IsSliceInBounds$"
// We optimize comparisons with small constant strings (see cmd/compile/internal/gc/walk.go),
// so this string literal must be long.
- if a[:n>>1] == "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
+ if b == "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
return 0
}
return 1
return
}
+func issue76332(s []int) (left, right []int) {
+ middle := len(s) >> 1
+ left = s[:middle] // ERROR "Proved IsSliceInBounds$"
+ right = s[middle:] // ERROR "Proved IsSliceInBounds$"
+ return
+}
+
func issue51622(b []byte) int {
if len(b) >= 3 && b[len(b)-3] == '#' { // ERROR "Proved IsInBounds$"
return len(b)