[llvm-bugs] [Bug 20750] Good codegen for bitwise rotate requires code that is technically undefined behavior
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 10 21:10:42 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=20750
Trass3r <trass3r at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |trass3r at gmail.com
Resolution|--- |DUPLICATE
--- Comment #11 from Trass3r <trass3r at gmail.com> ---
Your code is still UB if rot is >= 32.
Fix it to v >> (rot & 31) | v << (-rot & 31) and you also get a rot
instruction.
For more complex cases when the code gets inlined see:
https://bugs.llvm.org/show_bug.cgi?id=37417
*** This bug has been marked as a duplicate of bug 37417 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181111/baf29886/attachment.html>
More information about the llvm-bugs
mailing list