Skip to content

Conversation

@dianqk
Copy link
Member

@dianqk dianqk commented Jun 30, 2024

Fixes llvm#97147.

Transforming `(mul x, -(2^(N-M) - 1) * 2^M)` to `(sub (shl x, M), (shl
x, N))` will cause overflow when N is 32 and M is 31. I still added
checks for all scenarios, even other scenarios, don't seem to cause overflow.

(cherry picked from commit 4a96803)
@dianqk dianqk requested a review from a team June 30, 2024 14:16
@nikic nikic merged commit 934954a into rust-lang:rustc/18.1-2024-05-19 Jun 30, 2024
@dianqk dianqk deleted the backport-97148 branch June 30, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants