[llvm-bugs] [Bug 17332] Missed optimization of shifts into roll/rorl when avoiding undefined behavior

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 10 20:57:43 PST 2018


Trass3r <trass3r at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |trass3r at gmail.com
         Resolution|---                         |FIXED

--- Comment #17 from Trass3r <trass3r at gmail.com> ---
Just use the branchless (x << (n % width) | x >> (-n % width)) pattern.
Also used by clang internally to emit code for the _rotl MSVC intrinsic.
See https://bugs.llvm.org/show_bug.cgi?id=39624.

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/df2ff8e4/attachment.html>

More information about the llvm-bugs mailing list