[SLP] Add support for swapping icmp/fcmp predicates to permit vectorization
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 29 Mar 2019 10:41:00 +0000 (10:41 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 29 Mar 2019 10:41:00 +0000 (10:41 +0000)
commit62f0d1650a6f5e6f487ab16d4a88f5c7acb5122d
tree2b999893c7596f9fe75b705f0331470a2adfc9f5
parente5ac385fb1ffa4bd3875ea6a4d24efdbd7814572
[SLP] Add support for swapping icmp/fcmp predicates to permit vectorization

We should be able to match elements with the swapped predicate as well - as long as we commute the source operands.

Differential Revision: https://reviews.llvm.org/D59956

llvm-svn: 357243
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.ll