[SLP]Alternate vectorization for cmp instructions.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 16 Dec 2021 16:55:52 +0000 (08:55 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Wed, 2 Feb 2022 18:32:52 +0000 (10:32 -0800)
commit842a2360a84692f2e4c37cc3e652640e6627d004
treef81cc0d53ab50970fd158f04348c531c94898076
parent287ce6b51675aee43870bebfff68bb144d1ab90e
[SLP]Alternate vectorization for cmp instructions.

Added support for alternate ops vectorization of the cmp instructions.
It allows to vectorize either cmp instructions with same/swapped
predicate but different (swapped) operands kinds or cmp instructions
with different predicates and compatible operands kinds.

Differential Revision: https://reviews.llvm.org/D115955
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll
llvm/test/Transforms/SLPVectorizer/X86/cmp_commute-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.ll
llvm/test/Transforms/SLPVectorizer/X86/reduction-logical.ll