nac3/nac3core
David Mak 0d8cb909dd [core] codegen/expr: Fix and use gen_unaryop_expr for boolean not ops
While refactoring, I ran into the issue where `!true == true`, which was
caused by the same upper 7-bit of booleans being undefined issue that
was encountered before. It turns out the implementation in
`gen_unaryop_expr` is also inadequate, as `(~v & (i1) 0x1)`` will still
leave upper 7 bits undefined (for whatever reason).

This commit fixes this issue once and for all by using a combination of
`icmp` + `zext` to ensure that the resulting value must be `0 | 1`, and
refactor to use that whenever we need to invert boolean values.
2025-02-10 11:26:45 +08:00
..
irrt [core] codegen/ndarray: Reimplement matmul 2025-01-03 15:43:06 +08:00
nac3core_derive [core_derive] Ignore doctest in example 2024-11-22 00:00:05 +08:00
src [core] codegen/expr: Fix and use gen_unaryop_expr for boolean not ops 2025-02-10 11:26:45 +08:00
build.rs [meta] Cleanup from upgrading Rust version 2024-11-19 13:43:57 +08:00
Cargo.toml [meta] Update dependencies 2025-02-03 11:51:57 +08:00