[llvm-bugs] [Bug 37610] xor %a, C -> xor %a, -1 canonicalization

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 19 05:00:50 PDT 2020


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

Roman Lebedev <lebedev.ri at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Roman Lebedev <lebedev.ri at gmail.com> ---
(In reply to Sanjay Patel from comment #2)
> IR is now:
> define i8 @and_0(i32 %0, i8 %1) {
>   %3 = zext i8 %1 to i32
>   %4 = shl nsw i32 -1, %3
>   %5 = xor i32 %4, -1
>   %6 = and i32 %5, %0
>   %7 = trunc i32 %6 to i8
>   ret i8 %7
> }
> 
> 
> And the x86 backend sees it as 'bzhi' when allowed. Fixed?

I think we can consider this fixed, yes.
Thanks!

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


More information about the llvm-bugs mailing list