[PATCH] D27749: [APFloat] Fix rotl/rotr when the shift amount is greater than the total bit width.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 10:07:58 PST 2017
efriedma added inline comments.
================
Comment at: lib/Support/APInt.cpp:1253
+ }
+ rem = rot.urem(APInt(rot.getBitWidth(), BitWidth));
+ return rotl((unsigned)rem.getLimitedValue(BitWidth));
----------------
Please factor out the common code from rotl and rotr into a helper function. Maybe also add a comment describing why it's implemented in this particular way, since it's a bit subtle.
https://reviews.llvm.org/D27749
More information about the llvm-commits
mailing list