expr.c: access_add_ref_id: avoid using access relation
[pet.git] / tests / conditional_assignment.scop
blobb95eeea8cf9c8620edb27365a37b61a47595f0da
1 start: 218
2 end: 496
3 indent: "\t"
4 context: '[N, M] -> {  : N >= 0 and M >= 0 and N <= 2147483647 and M <= 2147483647
5   }'
6 arrays:
7 - context: '[N] -> {  : N >= 0 }'
8   extent: '[N, M] -> { A[i0, i1] : i0 >= 0 and i0 <= -1 + N and i1 >= 0 and i1 <=
9     9 }'
10   element_type: int
11   element_size: 4
12 - context: '[N] -> {  : N >= 0 }'
13   extent: '[N, M] -> { C[i0] : i0 <= -1 + N and i0 >= 0 }'
14   element_type: int
15   element_size: 4
16 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
17   extent: '[N, M] -> { in1[i0, i1] : i1 <= -1 + M and i1 >= 0 and i0 <= -1 + N and
18     i0 >= 0 }'
19   element_type: int
20   element_size: 4
21 - context: '[N] -> {  : N >= 0 }'
22   extent: '[N, M] -> { in2[i0] : i0 <= -1 + N and i0 >= 0 }'
23   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
24   element_type: int
25   element_size: 4
26 - context: '{  :  }'
27   extent: '[N, M] -> { m[] }'
28   element_type: int
29   element_size: 4
30 statements:
31 - line: 21
32   domain: '[N, M] -> { S_0[i] : i <= -1 + N and i >= 0 }'
33   schedule: '[N] -> { S_0[i] -> [0, i, 0] }'
34   body:
35     type: expression
36     expr:
37       type: op
38       operation: =
39       arguments:
40       - type: access
41         relation: '[N, M] -> { S_0[i] -> m[] }'
42         index: '[N, M] -> { S_0[i] -> m[] }'
43         reference: __pet_ref_0
44         read: 0
45         write: 1
46       - type: op
47         operation: +
48         arguments:
49         - type: access
50           relation: '[N, M] -> { S_0[i] -> [i] }'
51           index: '[N, M] -> { S_0[i] -> [(i)] }'
52           reference: __pet_ref_1
53           read: 1
54           write: 0
55         - type: int
56           value: 1
57 - line: 23
58   domain: '[N, M] -> { S_1[i, j] : j <= -1 + M and j >= 0 and i <= -1 + N and i >=
59     0 }'
60   schedule: '[N, M] -> { S_1[i, j] -> [0, i, 1, j] }'
61   body:
62     type: expression
63     expr:
64       type: op
65       operation: =
66       arguments:
67       - type: access
68         relation: '[N, M] -> { S_1[i, j] -> m[] }'
69         index: '[N, M] -> { S_1[i, j] -> m[] }'
70         reference: __pet_ref_2
71         read: 0
72         write: 1
73       - type: call
74         name: g
75         arguments:
76         - type: call
77           name: h
78           arguments:
79           - type: access
80             relation: '[N, M] -> { S_1[i, j] -> m[] }'
81             index: '[N, M] -> { S_1[i, j] -> m[] }'
82             reference: __pet_ref_3
83             read: 1
84             write: 0
85         - type: access
86           relation: '[N, M] -> { S_1[i, j] -> in1[i, j] }'
87           index: '[N, M] -> { S_1[i, j] -> in1[(i), (j)] }'
88           reference: __pet_ref_4
89           read: 1
90           write: 0
91 - line: 24
92   domain: '[N, M] -> { S_2[i] : i <= -1 + N and i >= 0 }'
93   schedule: '[N] -> { S_2[i] -> [0, i, 2] }'
94   body:
95     type: expression
96     expr:
97       type: call
98       name: compute_row
99       arguments:
100       - type: call
101         name: h
102         arguments:
103         - type: access
104           relation: '[N, M] -> { S_2[i] -> m[] }'
105           index: '[N, M] -> { S_2[i] -> m[] }'
106           reference: __pet_ref_5
107           read: 1
108           write: 0
109       - type: access
110         relation: '[N, M] -> { S_2[i] -> A[i, o1] }'
111         index: '[N, M] -> { S_2[i] -> A[(i)] }'
112         reference: __pet_ref_6
113         read: 0
114         write: 1
115 - line: 26
116   domain: '[N, M] -> { S_3[] }'
117   schedule: '{ S_3[] -> [1] }'
118   body:
119     type: expression
120     expr:
121       type: op
122       operation: =
123       arguments:
124       - type: access
125         relation: '[N, M] -> { S_3[] -> A[5, 6] }'
126         index: '[N, M] -> { S_3[] -> A[(5), (6)] }'
127         reference: __pet_ref_7
128         read: 0
129         write: 1
130       - type: int
131         value: 0
132 - line: 28
133   domain: '[N, M] -> { S_4[i] : i <= -1 + N and i >= 0 }'
134   schedule: '[N] -> { S_4[i] -> [2, i] }'
135   body:
136     type: expression
137     expr:
138       type: op
139       operation: =
140       arguments:
141       - type: access
142         relation: '[N, M] -> { S_4[i] -> C[i] }'
143         index: '[N, M] -> { S_4[i] -> C[(i)] }'
144         reference: __pet_ref_8
145         read: 0
146         write: 1
147       - type: op
148         operation: '?:'
149         arguments:
150         - type: access
151           relation: '[N, M] -> { [S_4[i] -> [i1]] -> [1] : i1 >= -i and i1 <= -1 +
152             N - i; [S_4[-1 + N] -> [1]] -> [0]; [S_4[0] -> [-1]] -> [0] }'
153           index: '[N, M] -> { [S_4[i] -> [i1]] -> [((1) : i1 >= -i and i1 <= -1 +
154             N - i; (0) : i = -1 + N and i1 = 1; (0) : i = 0 and i1 = -1)] }'
155           reference: __pet_ref_10
156           read: 1
157           write: 0
158           arguments:
159           - type: access
160             relation: '[N, M] -> { S_4[i] -> in2[i] }'
161             index: '[N, M] -> { S_4[i] -> in2[(i)] }'
162             reference: __pet_ref_9
163             read: 1
164             write: 0
165         - type: call
166           name: f
167           arguments:
168           - type: access
169             relation: '[N, M] -> { [S_4[i] -> [i1]] -> A[i + i1, o1] : i1 >= -i and
170               i1 <= -1 + N - i }'
171             index: '[N, M] -> { [S_4[i] -> [i1]] -> A[((i + i1) : i1 >= -i)] }'
172             reference: __pet_ref_12
173             read: 1
174             write: 0
175             arguments:
176             - type: access
177               relation: '[N, M] -> { S_4[i] -> in2[i] }'
178               index: '[N, M] -> { S_4[i] -> in2[(i)] }'
179               reference: __pet_ref_11
180               read: 1
181               write: 0
182         - type: int
183           value: 0