Skip to content

Commit

Permalink
Add comment regarding bit order
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski committed Nov 10, 2021
1 parent 1e18869 commit fe8ae57
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@ fn generic_simd_intrinsic(
// * an unsigned integer
// * an array of `u8`
// If the vector has less than 8 lanes, a u8 is returned with zeroed trailing bits.
//
// The bit order of the result depends on the byte endianness, LSB-first for little
// endian and MSB-first for big endian.
let expected_int_bits = in_len.max(8);
let expected_bytes = expected_int_bits / 8 + ((expected_int_bits % 8 > 0) as u64);

Expand Down

0 comments on commit fe8ae57

Please sign in to comment.