@@ -11,61 +11,64 @@ device test;
1111
1212data int zero = 0;
1313
14- parameter zeroes_50 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
14+ parameter zeroes_64 = [$zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
1515 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
1616 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
1717 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
1818 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
1919 $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];
2122
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,
2426 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
2527 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
2628 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
2729 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
2830 $zero, $zero, $zero, $zero, $zero, $zero, $zero, $zero,
29- $zero, 0, $zero];
31+ $zero, $zero, $zero, $zero, $zero, $zero, $zero, 0,
32+ $zero];
3033
3134bank b {
32- register regs[i in 0..50 ] size 4 @ undefined;
35+ register regs[i in 0..64 ] size 4 @ undefined;
3336}
3437
3538method init {
36- local int i ;
39+ local int nonconstant ;
3740
3841 // no warning
39- foreach x in ($zeroes_50 ) assert true;
42+ foreach x in ($zeroes_64 ) assert true;
4043 // 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 ) {
4245 assert true;
4346 } else assert true;
4447
4548 /// WARNING WBIGUNROLL
46- foreach x in ($zeroes_51 ) assert true;
49+ foreach x in ($zeroes_65 ) assert true;
4750 /// WARNING WBIGUNROLL
48- select x in ($zeroes_51 ) where (x == i ) {
51+ select x in ($zeroes_65 ) where (x == nonconstant ) {
4952 assert true;
5053 } else assert true;
5154
5255 // 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
5760 if (x != 0) assert true;
5861 }
5962
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) {
6366 assert true;
6467 } else assert true;
6568
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 ) {
6972 assert true;
7073 } else assert true;
7174
@@ -74,7 +77,7 @@ method init {
7477 // syntax, not the object lists generated by DMLC
7578 // no warning
7679 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 ) {
7881 assert true;
7982 } else assert true;
8083}
0 commit comments