Home | History | Annotate | Download | only in ssa

Lines Matching refs:max

8 	max   *Value // maximum value. exclusive.
11 // min <= ind < max
12 // min <= nxt <= max
21 // if ind < max
44 var ind, max *Value // induction, and maximum
47 // Check thet the control if it either ind < max or max > ind.
52 ind, max = b.Control.Args[0], b.Control.Args[1]
55 ind, max = b.Control.Args[1], b.Control.Args[0]
93 // the mininum value (min) and the maximum value (max).
106 // reached iff ind < max.
113 // nxt is computed when inc < max, meaning nxt <= max.
119 // If max is c + SliceLen with c <= 0 then we drop c.
121 // TODO: save c as an offset from max.
122 if w, c := dropAdd64(max); (w.Op == OpStringLen || w.Op == OpSliceLen) && 0 >= c && -c >= 0 {
123 max = w
130 if min.Op == OpConst64 && max.Op == OpConst64 {
131 if max.AuxInt > min.AuxInt && max.AuxInt%inc.AuxInt == min.AuxInt%inc.AuxInt { // handle overflow
153 max: max,
156 b.Logf("found induction variable %v (inc = %v, min = %v, max = %v)\n", ind, inc, min, max)
185 // (IsInBounds ind max) where 0 <= const == min <= ind < max.
186 // (IsSliceInBounds ind max) where 0 <= const == min <= ind < max.
206 if v.Args[1] == iv.max {
217 // (IsSliceInBounds ind (SliceCap a)) where 0 <= min <= ind < max == (SliceLen a)
233 if v.Args[1].Op == OpSliceCap && iv.max.Op == OpSliceLen && v.Args[1].Args[0] == iv.max.Args[0] {
244 // (IsInBounds (Add64 ind) (Const64 [c])) where 0 <= min <= ind < max <= (Const64 [c])
245 // (IsSliceInBounds ind (Const64 [c])) where 0 <= min <= ind < max <= (Const64 [c])
254 if !v.Args[1].isGenericIntConst() || !iv.max.isGenericIntConst() {
260 // If limit++ overflows signed integer then 0 <= max && max <= limit will be false.
264 if max := iv.max.AuxInt + add; 0 <= max && max <= limit { // handle overflow
266 f.Warnl(b.Pos, "Found redundant (%s ind %d), ind < %d", v.Op, v.Args[1].AuxInt, iv.max.AuxInt+add)