Sanjay Patel <> changed:

           What    |Removed                     |Added
         Resolution|---                         |FIXED
                 CC|                            |
             Status|REOPENED                    |RESOLVED

--- Comment #5 from Sanjay Patel <> ---
After (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

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

Reply via email to