afonso360 opened PR #3074 from aarch-ishl-i8
to main
:
This PR addresses two issues:
- A panic when shifting any non i128 type by i128 amounts (#3064)
- Wrong results when lowering shifts with small types (i8, i16)
In these types when shifting for amounts larger than the size of the
type, we would not get the wrapping behaviour that we see on i32 and i64.
This is because in these larger types, the wrapping behaviour is automatically
implemented by using the appropriate instruction, however we do not
have i8 and i16 specific instructions, so we have to manually wrap
the shift amount with an AND instruction.This issue is also found on x86_64 and s390x, and a separate issue will
be filed for those.Closes #3064
afonso360 updated PR #3074 from aarch-ishl-i8
to main
.
afonso360 updated PR #3074 from aarch-ishl-i8
to main
.
afonso360 updated PR #3074 from aarch-ishl-i8
to main
.
akirilov-arm submitted PR review.
akirilov-arm submitted PR review.
akirilov-arm created PR review comment:
Another potential optimization here is to use the shift destination register instead of a temporary one.
akirilov-arm created PR review comment:
Could you extract this helper function to
lower.rs
?
afonso360 updated PR #3074 from aarch-ishl-i8
to main
.
afonso360 requested akirilov-arm for a review on PR #3074.
akirilov-arm submitted PR review.
akirilov-arm merged PR #3074.
Last updated: Dec 23 2024 at 12:05 UTC