-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logic right shift for negative numbers (#10575)
Summary: `>>` operator may perform an arithmetic shift right for signed integers, depending on the compiler, which gives wrong result when the input is negative. To ensure a logical shift, we cast it to uint64_t. Pull Request resolved: #10575 Reviewed By: kgpai Differential Revision: D60261588 Pulled By: zacw7 fbshipit-source-id: a86cb5b01fb4a8daf696eca5c6f0edbff273e019
- Loading branch information
1 parent
e3e791a
commit 75020ec
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters