https://bugs.llvm.org/show_bug.cgi?id=16726

Sanjay Patel <spatel+l...@rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |spatel+l...@rotateright.com
             Status|REOPENED                    |RESOLVED

--- Comment #5 from Sanjay Patel <spatel+l...@rotateright.com> ---
After https://reviews.llvm.org/rL310509 (an IR solution):

$ ./clang -O2 16726.c -S -o - |grep ro | grep \%
        rolb    %cl, %dil
        rorb    %cl, %dil
        rolw    %cl, %di
        rorw    %cl, %di
        roll    %cl, %edi
        rorl    %cl, %edi
        rolq    %cl, %rdi
        rorq    %cl, %rdi

Note: 
1. I don't think the code examples as written in C are safe - if the shift
amount exceeds the type width or is 0, then you have UB.

2. We're still producing 'and' to mask the rotation amount which seems
unnecessary based on the gcc code. There's more discussion about that in the
newer bug 34046, so I'm going to resolve this one (feel free to reopen if you
disagree) and leave that one open.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to