diff options
-rw-r--r-- | src/synth/synth-oper.adb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 6634a2b2b..c394df158 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -929,10 +929,15 @@ package body Synth.Oper is case Def is when Iir_Predefined_Error => return null; - when Iir_Predefined_Ieee_1164_Scalar_Not - | Iir_Predefined_Boolean_Not - | Iir_Predefined_Bit_Not => + when Iir_Predefined_Ieee_1164_Scalar_Not => return Synth_Bit_Monadic (Id_Not); + when Iir_Predefined_Boolean_Not + | Iir_Predefined_Bit_Not => + if Is_Const (Operand) then + return Create_Value_Discrete (1 - Operand.Scal, Oper_Typ); + else + return Synth_Bit_Monadic (Id_Not); + end if; when Iir_Predefined_Ieee_1164_Vector_Not | Iir_Predefined_Ieee_Numeric_Std_Not_Uns | Iir_Predefined_Ieee_Numeric_Std_Not_Sgn => |