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 negative shift left reported by UBSan #757

Merged
merged 1 commit into from
Apr 26, 2016

Conversation

mayeut
Copy link
Collaborator

@mayeut mayeut commented Apr 26, 2016

As @boxerab said, this shall have no performance impact on 2’s complement machine where
the compiler generates a left shift instruction for the signed multiplication by a positive constant power of two.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.

Update #718

This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
@mayeut mayeut merged commit 6f2ac3e into uclouvain:master Apr 26, 2016
@mayeut mayeut deleted the neg-shift-left branch April 26, 2016 20:07
mayeut added a commit to mayeut/openjpeg that referenced this pull request Apr 27, 2016
Follow-up of uclouvain#757

This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
mayeut added a commit that referenced this pull request Apr 27, 2016
Follow-up of #757

This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
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