[X86] MatchVectorAllZeroTest - handle icmp_eq(bitcast(vXi1 trunc(Y)),0) style reducti...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 3 Apr 2023 13:30:32 +0000 (14:30 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 3 Apr 2023 14:11:13 +0000 (15:11 +0100)
commit39d7bf6e3468774ede7004d1f7969f4962e8806f
treed3971ad17abc38beea2eca078ec0826b9b0850ba
parent9b5ff4436e446e9df97ee37b3bcf9ba029c7d9aa
[X86] MatchVectorAllZeroTest - handle icmp_eq(bitcast(vXi1 trunc(Y)),0) style reduction patterns

If we've truncated from a wider vector, then perform the all vector comparison on that with a suitable mask

There's a minor pre-SSE41 regression due to a missing movmsk(icmp_eq(and(x,c1pow2),c1pow2)) -> movmsk(shl(x,c2)) fold that will be addressed in a followup commit
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bitcast-vector-bool.ll