[X86][AVX2] combineSetCCMOVMSK - handle all_of patterns for PMOVMSKB(PACKSSBW(LO...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Jun 2020 20:08:35 +0000 (21:08 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Jun 2020 20:08:53 +0000 (21:08 +0100)
commitce677ef532a5958d4bb78cf80725e2c3d13db66b
tree93cadbe7834f396563ca41635e84c7678d23a928
parenta25f5cd70cef6f74eed45a61c14abca98cd416e4
[X86][AVX2] combineSetCCMOVMSK - handle all_of patterns for PMOVMSKB(PACKSSBW(LO(X), HI(X)))

In the sign splat case, we can fold PMOVMSKB(PACKSSBW(LO(X), HI(X))) -> PMOVMSKB(BITCAST_v32i8(X)) without introducing a signmask + comparison (which unlike for any_of won't fold into a single TEST).
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-compare-all_of.ll
llvm/test/CodeGen/X86/vector-reduce-and-bool.ll