[X86][SSE] Attempt to widen MOVMSK vector input if the signbits are splatted.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Jun 2020 10:19:45 +0000 (11:19 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Jun 2020 10:44:43 +0000 (11:44 +0100)
commit0741b75ad543d108759c0658fedb5fdfcf064487
treed777e215ad96092ea89effeecf6606e8066b21ce
parent4affc444b499ba2a12fee7f9ef0bb6ef33789c12
[X86][SSE] Attempt to widen MOVMSK vector input if the signbits are splatted.

As shown on PR37087, if we have a MOVMSK(BICAST(X)) from a wider vector, then by using MOVMSK from the wider type (32/64-bit elements) we can improve the chances of further combines with SimplifyDemandedBits/Elts and on some targets (skylake) can be more efficient.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-movmsk-avx.ll
llvm/test/CodeGen/X86/combine-movmsk.ll