[llvm-bugs] [Bug 37506] vector operations fail to optimize to _mm_testz_si128 / _mm256_testz_si256

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 7 03:06:53 PST 2020


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

Simon Pilgrim <llvm-dev at redking.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Fixed By Commit(s)|                            |0101fb73de71132bd5b25cfadc6
                   |                            |3974c692dbc5b
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Simon Pilgrim <llvm-dev at redking.me.uk> ---
I'm going to resolve this - InstCombine will now expand MOVMSK intrinsics to a
generic bitcast(trunc(icmp_slt(x))) pattern that can be optimized much further,
and the backend does a good job of lowering such reduction patterns to PTEST
where appropriate.

In this case we still use MOVMSK as we can avoid the constant load and just
perform it as a CMP+MOVMSK; after 0101fb73de71132bd5b25cfadc63974c692dbc5b we
remove all ashr/icmp ops and just use MOVMSK to directly extract the signbits
of the loaded vectors.

-- 
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/20201207/751724fe/attachment.html>


More information about the llvm-bugs mailing list