Lines Matching full:index
4 // CHECK: %[[cst:.*]] = "test.constant"() <{value = 3 : index}
6 func.func @constant() -> index {
7 %0 = test.with_bounds { umin = 3 : index, umax = 3 : index,
8 smin = 3 : index, smax = 3 : index} : index
9 func.return %0 : index
13 // CHECK: %[[cst:.*]] = "test.constant"() <{value = 4 : index}
15 func.func @increment() -> index {
16 … = test.with_bounds { umin = 3 : index, umax = 3 : index, smin = 0 : index, smax = 0x7ffffffffffff…
17 %1 = test.increment %0 : index
18 func.return %1 : index
22 // CHECK: test.reflect_bounds {smax = 4 : index, smin = 3 : index, umax = 4 : index, umin = 3 : ind…
23 func.func @maybe_increment(%arg0 : i1) -> index {
24 %0 = test.with_bounds { umin = 3 : index, umax = 3 : index,
25 smin = 3 : index, smax = 3 : index} : index
26 %1 = scf.if %arg0 -> index {
27 scf.yield %0 : index
29 %2 = test.increment %0 : index
30 scf.yield %2 : index
32 %3 = test.reflect_bounds %1 : index
33 func.return %3 : index
37 // CHECK: test.reflect_bounds {smax = 4 : index, smin = 3 : index, umax = 4 : index, umin = 3 : ind…
38 func.func @maybe_increment_br(%arg0 : i1) -> index {
39 %0 = test.with_bounds { umin = 3 : index, umax = 3 : index,
40 smin = 3 : index, smax = 3 : index} : index
43 %1 = test.increment %0 : index
44 cf.br ^bb2(%1 : index)
46 cf.br ^bb2(%0 : index)
47 ^bb2(%2 : index):
48 %3 = test.reflect_bounds %2 : index
49 func.return %3 : index
53 // CHECK: test.reflect_bounds {smax = 1 : index, smin = 0 : index, umax = 1 : index, umin = 0 : ind…
54 func.func @for_bounds() -> index {
55 %c0 = test.with_bounds { umin = 0 : index, umax = 0 : index,
56 smin = 0 : index, smax = 0 : index} : index
57 %c1 = test.with_bounds { umin = 1 : index, umax = 1 : index,
58 smin = 1 : index, smax = 1 : index} : index
59 %c2 = test.with_bounds { umin = 2 : index, umax = 2 : index,
60 smin = 2 : index, smax = 2 : index} : index
62 %0 = scf.for %arg0 = %c0 to %c2 step %c1 iter_args(%arg2 = %c0) -> index {
63 scf.yield %arg0 : index
65 %1 = test.reflect_bounds %0 : index
66 func.return %1 : index
70 …bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -1 : index…
71 func.func @no_analysis_of_loop_variants() -> index {
72 %c0 = test.with_bounds { umin = 0 : index, umax = 0 : index,
73 smin = 0 : index, smax = 0 : index} : index
74 %c1 = test.with_bounds { umin = 1 : index, umax = 1 : index,
75 smin = 1 : index, smax = 1 : index} : index
76 %c2 = test.with_bounds { umin = 2 : index, umax = 2 : index,
77 smin = 2 : index, smax = 2 : index} : index
79 %0 = scf.for %arg0 = %c0 to %c2 step %c1 iter_args(%arg2 = %c0) -> index {
80 %1 = test.increment %arg2 : index
81 scf.yield %1 : index
83 %2 = test.reflect_bounds %0 : index
84 func.return %2 : index
88 // CHECK: test.reflect_bounds {smax = 4 : index, smin = 3 : index, umax = 4 : index, umin = 3 : ind…
90 test.with_bounds_region { umin = 3 : index, umax = 4 : index,
91 smin = 3 : index, smax = 4 : index } %arg0 : index {
92 %0 = test.reflect_bounds %arg0 : index
98 …bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -1 : index…
99 func.func @func_args_unbound(%arg0 : index) -> index {
100 %0 = test.reflect_bounds %arg0 : index
101 func.return %0 : index
105 func.func @propagate_across_while_loop_false() -> index {
107 %0 = test.with_bounds { umin = 0 : index, umax = 0 : index,
108 smin = 0 : index, smax = 0 : index } : index
109 %1 = scf.while : () -> index {
111 scf.condition(%false) %0 : index
113 ^bb0(%i1: index):
117 %2 = test.increment %1 : index
118 return %2 : index
122 func.func @propagate_across_while_loop(%arg0 : i1) -> index {
124 %0 = test.with_bounds { umin = 0 : index, umax = 0 : index,
125 smin = 0 : index, smax = 0 : index } : index
126 %1 = scf.while : () -> index {
127 scf.condition(%arg0) %0 : index
129 ^bb0(%i1: index):
133 %2 = test.increment %1 : index
134 return %2 : index
138 func.func @dont_propagate_across_infinite_loop() -> index {
140 %0 = test.with_bounds { umin = 0 : index, umax = 0 : index,
141 smin = 0 : index, smax = 0 : index } : index
143 %1 = scf.while : () -> index {
146 scf.condition(%true) %0 : index
148 ^bb0(%i1: index):
151 // CHECK: %[[ret:.*]] = test.reflect_bounds %[[loopRes]] : index
152 %2 = test.reflect_bounds %1 : index
154 return %2 : index