[X86][SSE] combineHorizontalPredicateResult - improve all_of(X == 0) for vXi64 on...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Jun 2020 16:41:15 +0000 (17:41 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 19 Jun 2020 10:43:25 +0000 (11:43 +0100)
commitc143db3b1032042193c152790bcefe34365e6d6c
treecac6d1a5a932aef5b1b2388e09d066b1537020cd
parentd2fcc586223c522098df7a627e87a6a6c8381fbe
[X86][SSE] combineHorizontalPredicateResult - improve all_of(X == 0) for vXi64 on pre-SSE41 targets

Without SSE41 we don't have the PCMPEQQ instruction, making cmp-with-zero reductions more complicated than necessary. We can compare as vXi32 (PCMPEQD) and tweak the MOVMSK comparison to test upper/lower DWORD comparisons.

This pre-fixes something that occurs with null tests for vectors of (64-bit) pointers such as in PR35129.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-reduce-and-bool.ll