Skip to content

Fix negative shift left reported by UBSan#757

Merged
mayeut merged 1 commit intouclouvain:masterfrom
mayeut:neg-shift-left
Apr 26, 2016
Merged

Fix negative shift left reported by UBSan#757
mayeut merged 1 commit intouclouvain:masterfrom
mayeut:neg-shift-left

Conversation

@mayeut
Copy link
Copy Markdown
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