@@ -11,61 +11,64 @@ device test;
11
11
12
12
data int zero = 0;
13
13
14
- parameter zeroes_50 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
14
+ parameter zeroes_64 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
15
15
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
16
16
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
17
17
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
18
18
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
19
19
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
20
- $zero, $zero];
20
+ $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
21
+ $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero];
21
22
22
- // Fiftieth zero is constant
23
- parameter zeroes_51 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
23
+ // Sixtyfourth zero is constant
24
+ parameter zeroes_65 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
25
+ $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
24
26
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
25
27
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
26
28
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
27
29
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
28
30
$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
29
- $zero, 0, $zero];
31
+ $zero, $zero, $zero, $zero, $zero, $zero, $zero, 0,
32
+ $zero];
30
33
31
34
bank b {
32
- register regs[i in 0..50 ] size 4 @ undefined;
35
+ register regs[i in 0..64 ] size 4 @ undefined;
33
36
}
34
37
35
38
method init {
36
- local int i ;
39
+ local int nonconstant ;
37
40
38
41
// no warning
39
- foreach x in ($zeroes_50 ) assert true;
42
+ foreach x in ($zeroes_64 ) assert true;
40
43
// The else branch is not considered an iteration
41
- select x in ($zeroes_50 ) where (x == i ) {
44
+ select x in ($zeroes_64 ) where (x == nonconstant ) {
42
45
assert true;
43
46
} else assert true;
44
47
45
48
/// WARNING WBIGUNROLL
46
- foreach x in ($zeroes_51 ) assert true;
49
+ foreach x in ($zeroes_65 ) assert true;
47
50
/// WARNING WBIGUNROLL
48
- select x in ($zeroes_51 ) where (x == i ) {
51
+ select x in ($zeroes_65 ) where (x == nonconstant ) {
49
52
assert true;
50
53
} else assert true;
51
54
52
55
// no warning
53
- foreach x in ($zeroes_51 ) {
54
- // As fiftieth bit is constant 0, DML 1.2 semantics eliminates this if
55
- // entirely , and subsequently causes that iteration to be omitted from
56
- // codegen entirely; reducing the total count to 50
56
+ foreach x in ($zeroes_65 ) {
57
+ // As sixtyfourth bit is constant 0, DML 1.2 semantics eliminates this
58
+ // if , and subsequently causes that iteration to be omitted from
59
+ // codegen entirely; reducing the total count to 64
57
60
if (x != 0) assert true;
58
61
}
59
62
60
- // As fiftieth bit is constant 0, select can cut short at it, reducing the
61
- // total number of iterations to 50
62
- select x in ($zeroes_50 ) where (x == 0) {
63
+ // As sixtyfourth bit is constant 0, select can cut short at it, reducing
64
+ // the total number of iterations to 64
65
+ select x in ($zeroes_65 ) where (x == 0) {
63
66
assert true;
64
67
} else assert true;
65
68
66
- // As fiftieth bit is constant 0, select can omit the check and thus
67
- // iteration for it, reducing the total number of iterations to 50
68
- select x in ($zeroes_50 ) where (x == 1 ) {
69
+ // As sixtyfourth bit is constant 0, select can omit the check and thus
70
+ // iteration for it, reducing the total number of iterations to 64
71
+ select x in ($zeroes_65 ) where (x != 0 ) {
69
72
assert true;
70
73
} else assert true;
71
74
@@ -74,7 +77,7 @@ method init {
74
77
// syntax, not the object lists generated by DMLC
75
78
// no warning
76
79
foreach x in ($b.unmapped_registers) assert true;
77
- select x in ($b.unmapped_registers) where (i == 0 ) {
80
+ select x in ($b.unmapped_registers) where (x == nonconstant ) {
78
81
assert true;
79
82
} else assert true;
80
83
}
0 commit comments