Fix for GitHub issue #18 : undef propagation of const multiplies is incorrect.
When an expression is elaborated, the compiler converts multiplies with one constamt zero operand into a constant zero value. This is only valid if the other operand is not a 4-state variable.
This commit is contained in:
parent
5dcd2e8957
commit
ed2e339dd6
|
|
@ -538,7 +538,7 @@ NetExpr* PEBinary::elaborate_expr_base_mult_(Design*,
|
|||
return tmp;
|
||||
}
|
||||
|
||||
if (rp_val.is_zero()) {
|
||||
if (rp_val.is_zero() && (lp->expr_type() != IVL_VT_LOGIC)) {
|
||||
NetEConst*tmp = make_const_0(expr_wid);
|
||||
tmp->cast_signed(signed_flag_);
|
||||
tmp->set_line(*this);
|
||||
|
|
|
|||
Loading…
Reference in New Issue