Open vincent-mirian-google opened 4 years ago
When using the enumerate operator, the IR conversion tool throws an error.
Test case: fn f(input: u32[4]) -> u32 { let result = for ((i, elem), accum): ((u32, u32), u32) in enumerate(input) { u32:0 }(u32:0); u32:0 }
Error: For-loop is of an unsupported form for IR conversion; only a 'range(0, const)' call is supported, found non-range callee.
To execute: _ir_convertermain \<DSLX file with content above>
This issue is to address
https://github.com/google/xls/blob/2ebaec60e59e206df9491f00459f6936d481fb00/xls/dslx/ir_converter.py#L711-L715
When using the enumerate operator, the IR conversion tool throws an error.
Test case: fn f(input: u32[4]) -> u32 { let result = for ((i, elem), accum): ((u32, u32), u32) in enumerate(input) { u32:0 }(u32:0); u32:0 }
Error: For-loop is of an unsupported form for IR conversion; only a 'range(0, const)' call is supported, found non-range callee.
To execute: _ir_convertermain \<DSLX file with content above>