If parallelization for FuTIL lowering.
Closed this issue · 1 comments
cgyurgyik commented
decl A: ubit<32>[1];
let x: ubit<32> = 0;
if (x == 0) { x := 2; }
A[0] := x; // Holds zero :-(
A[0]
will still hold value 0
instead of 2
. However, it works fine in the following cases:
decl A: ubit<32>[1];
let x: ubit<32> = 0;
if (x == 0) { x := 2; } else { x := x; }
A[0] := x; // Holds 2!
decl A: ubit<32>[1];
let x: ubit<32> = 0;
if (x == 0) { x := 2; }
---
A[0] := x; // Holds 2!
@sgpthomas Noted that since the if
writes to x
, it should be sequenced with the read from x
.
sampsyo commented
Just wanted to say this is a model bug report. Minimal but independently-compilable examples, including expected vs. actual output. Wahoo! 🙌