Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ impl FunctionContext<'_> {
location: Location,
length: Option<ValueId>,
) -> Result<Values, RuntimeError> {
self.builder.set_location(location);

// base_index = index * type_size
let index = self.make_array_index(index);
let type_size_usize = Self::convert_type(element_type).size_of_type();
Expand Down Expand Up @@ -564,11 +566,7 @@ impl FunctionContext<'_> {
// so it's okay to use unchecked operations. The SSA interpreter has been updated to have similar semantics.
let unchecked = true;

let base_index = self.builder.set_location(location).insert_binary(
index,
BinaryOp::Mul { unchecked },
type_size,
);
let base_index = self.builder.insert_binary(index, BinaryOp::Mul { unchecked }, type_size);

let mut field_index = 0u128;
Ok(Self::map_type(element_type, |typ| {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fn main(b: i64, mut c: bool) -> pub Field {
fn main(b: i64) -> pub Field {
if ((6863985126385003285_i64 - b) != 0) {
10
} else {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading