Skip to content

Commit

Permalink
fix(ssa refactor): simplify cast Field -> unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
joss-aztec committed Jun 15, 2023
1 parent f1fe207 commit 37cead8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/noirc_evaluator/src/ssa_refactor/ir/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ impl Instruction {
(
Type::Numeric(NumericType::Unsigned { bit_size }),
Type::Numeric(NumericType::Unsigned { .. }),
)
| (
Type::Numeric(NumericType::Unsigned { bit_size }),
Type::Numeric(NumericType::NativeField),
) => {
let integer_modulus = BigUint::from(2u128).pow(*bit_size);
let constant: BigUint = BigUint::from_bytes_be(&constant.to_be_bytes());
Expand Down

0 comments on commit 37cead8

Please sign in to comment.