Skip to content

Commit

Permalink
fix: remove cmp redeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Jan 1, 2025
1 parent 29dd0b2 commit c86a753
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions fuel-vm/src/interpreter/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,27 +1125,21 @@ fn slices_equal_avx2(a: &[u8], b: &[u8]) -> bool {
_mm256_loadu_si256(b.as_ptr().add(i) as *const _),
);

let cmp2 =
_mm256_cmpeq_epi8(
_mm256_loadu_si256(a.as_ptr().add(j) as *const _),
_mm256_loadu_si256(b.as_ptr().add(j) as *const _),
let cmp2 = _mm256_cmpeq_epi8(
_mm256_loadu_si256(a.as_ptr().add(j) as *const _),
_mm256_loadu_si256(b.as_ptr().add(j) as *const _),
);

let cmp3 = _mm256_cmpeq_epi8(
_mm256_loadu_si256(a.as_ptr().add(k) as *const _),
_mm256_loadu_si256(b.as_ptr().add(k) as *const _),
let cmp3 = _mm256_cmpeq_epi8(
_mm256_loadu_si256(a.as_ptr().add(k) as *const _),
_mm256_loadu_si256(b.as_ptr().add(k) as *const _),
);

let cmp4 = _mm256_cmpeq_epi8(
_mm256_loadu_si256(a.as_ptr().add(l) as *const _),
_mm256_loadu_si256(b.as_ptr().add(l) as *const _),
_mm256_loadu_si256(a.as_ptr().add(l) as *const _),
_mm256_loadu_si256(b.as_ptr().add(l) as *const _),
);

let cmp1 = _mm256_cmpeq_epi8(chunk_a1, chunk_b1);
let cmp2 = _mm256_cmpeq_epi8(chunk_a2, chunk_b2);
let cmp3 = _mm256_cmpeq_epi8(chunk_a3, chunk_b3);
let cmp4 = _mm256_cmpeq_epi8(chunk_a4, chunk_b4);

let combined = _mm256_and_si256(
_mm256_and_si256(cmp1, cmp2),
_mm256_and_si256(cmp3, cmp4),
Expand Down

0 comments on commit c86a753

Please sign in to comment.