[X86] Refactor MatchVectorAllZeroTest -> MatchVectorAllEqualTest
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Apr 2023 10:08:13 +0000 (11:08 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Apr 2023 10:08:13 +0000 (11:08 +0100)
commitb0b5c546e5c9bc4ad1fbd781146046f3845ebb07
tree3fa9744dd047f72f481d988fe69046bc4f4f8f52
parent5d4f644b33006fe4e97239cc04e2a010239981e6
[X86] Refactor MatchVectorAllZeroTest -> MatchVectorAllEqualTest

Refactor MatchVectorAllZeroTest to work with allof/anyof/noneof comparisons with -1 as well as 0, and use it handle icmp(bitcast(icmp_eq(X,Y)),-1) reduction patterns.

We're still missing test coverage for other other reduction types, so have kept these limited to icmp X,0 for now.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-mask-op.ll
llvm/test/CodeGen/X86/movmsk-cmp.ll
llvm/test/CodeGen/X86/vector-compare-all_of.ll
llvm/test/CodeGen/X86/vector-reduce-and-bool.ll