Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong safemath lowering #723

Merged
merged 1 commit into from
May 27, 2022
Merged

Conversation

Y-Nak
Copy link
Member

@Y-Nak Y-Nak commented May 27, 2022

What was wrong?

  1. Right shift operation isn't lowered sar when operands are signed type
  2. negate operation isn't lowered into safe_sub call.

How was it fixed?

🔪

  • OPTIONAL: Update Spec if applicable
  • Add entry to the release notes (may forgo for trivial changes)
  • Clean up commit history

@Y-Nak Y-Nak force-pushed the fix-safe-math branch 2 times, most recently from 208642d to f4e82f5 Compare May 27, 2022 05:19
@Y-Nak Y-Nak requested a review from cburgdorf May 27, 2022 05:20
@codecov-commenter
Copy link

Codecov Report

Merging #723 (52256eb) into master (f810961) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #723      +/-   ##
==========================================
- Coverage   81.68%   81.65%   -0.03%     
==========================================
  Files         105      105              
  Lines       11843    11851       +8     
==========================================
+ Hits         9674     9677       +3     
- Misses       2169     2174       +5     
Impacted Files Coverage Δ
crates/codegen/src/yul/isel/function.rs 80.50% <60.00%> (-0.56%) ⬇️
crates/mir/src/ir/value.rs 61.53% <100.00%> (+3.20%) ⬆️
crates/analyzer/src/context.rs 60.83% <0.00%> (-0.84%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f810961...52256eb. Read the comment docs.

@cburgdorf cburgdorf merged commit 4211cd4 into ethereum:master May 27, 2022
@Y-Nak Y-Nak deleted the fix-safe-math branch May 27, 2022 08:21
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.

3 participants