[X86] MatchVectorAllZeroTest - fix bug when splitting vectors of large elements
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 6 Apr 2023 09:55:33 +0000 (10:55 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 6 Apr 2023 09:55:38 +0000 (10:55 +0100)
commitb29ec28fd67fb72b007d9d763d4c054e5fd9cd63
treee1586c3be8d8faf2f272f26eebec12a482b3e43b
parent6bda53c5914ac4d9fc86754283c080125528fa4a
[X86] MatchVectorAllZeroTest - fix bug when splitting vectors of large elements

DAG::SplitVector only works with vectors with even numbers of elements, when splitting vectors with large (illegal) element widths, we are likely to split down to <1 x iXXX>.

In such cases, pre-bitcast to a <X x i64> type to ensure splitting will always succeed.

Thanks to @alexfh for identifying this.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/setcc-wide-types.ll