No need to emit any alignment check for byte-aligned accesses.

This commit is contained in:
Nick Lewycky 2019-08-20 11:30:30 -07:00
parent 70d561a1dd
commit 2882c75957

View File

@ -500,7 +500,9 @@ fn trap_if_misaligned(
ptr: PointerValue,
) {
let align = match memarg.flags & 3 {
0 => 1,
0 => {
return; /* No alignment to check. */
}
1 => 2,
2 => 4,
3 => 8,