[X86] combineVectorTruncationWithPACKUS - remove split/concatenation of mask
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Apr 2019 17:23:09 +0000 (17:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Apr 2019 17:23:09 +0000 (17:23 +0000)
commit4171a91e92888bc8aa849cb07dc384867cea5e3d
tree9ba62b512ae3b5bb8b799b326fa87daa9ab9e255
parente955f8bac48ed7a5e287b4092f175e65f7c80aba
[X86] combineVectorTruncationWithPACKUS - remove split/concatenation of mask

combineVectorTruncationWithPACKUS is currently splitting the upper bit bit masking into 128-bit subregs and then concatenating them back together.

This was originally done to avoid regressions that caused existing subregs to be concatenated to the larger type just for the AND masking before being extracted again. This was fixed by @spatel (notably rL303997 and rL347356).

This also lets SimplifyDemandedBits do some further improvements before it hits the recursive depth limit.

My only annoyance with this is that we were broadcasting some xmm masks but we seem to have lost them by moving to ymm - but that's a known issue as the logic in lowerBuildVectorAsBroadcast isn't great.

Differential Revision: https://reviews.llvm.org/D60375#inline-539623

llvm-svn: 358692
13 files changed:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/masked_store_trunc.ll
llvm/test/CodeGen/X86/psubus.ll
llvm/test/CodeGen/X86/vector-trunc-math-widen.ll
llvm/test/CodeGen/X86/vector-trunc-math.ll
llvm/test/CodeGen/X86/vector-trunc-packus-widen.ll
llvm/test/CodeGen/X86/vector-trunc-packus.ll
llvm/test/CodeGen/X86/vector-trunc-ssat-widen.ll
llvm/test/CodeGen/X86/vector-trunc-ssat.ll
llvm/test/CodeGen/X86/vector-trunc-usat-widen.ll
llvm/test/CodeGen/X86/vector-trunc-usat.ll
llvm/test/CodeGen/X86/vector-trunc-widen.ll
llvm/test/CodeGen/X86/vector-trunc.ll