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

dfmc-llvm-back-end: Simplify left shift overflow detection #1369

Merged

Conversation

housel
Copy link
Member

@housel housel commented Jan 4, 2021

This change refines the fix made in PR #1256, simplifying the generated code slightly.

* sources/dfmc/llvm-back-end/llvm-primitives-machine-word.dylan
  (primitive-machine-word-shift-left-signal-overflow): Check for
   overflow by performing the needed shfit, shifting that back, and
   comparing the result with the original value to ensure no bits
   were lost.
@housel housel merged commit a515b3a into dylan-lang:master Jan 4, 2021
@housel housel deleted the left-shift-signal-overflow-simplified branch January 4, 2021 20:26
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