[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
Wed Dec 14 10:56:21 PST 2016

efriedma requested changes to this revision.
efriedma added a reviewer: efriedma.
efriedma added a comment.
This revision now requires changes to proceed.

There are two problems with the rotl() proposed by this patch:

1. getZExtValue() will cause an assertion failure if the shift amount is greater than 2^64.
2. Truncation doesn't work correctly if the bitwidth of the APInt isn't a power of two; you need to use urem or something like that.



More information about the llvm-commits mailing list