[SLPVectorizer] Pass the right type argument to getCmpSelInstrCost()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 12 Apr 2017 13:29:25 +0000 (13:29 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 12 Apr 2017 13:29:25 +0000 (13:29 +0000)
commit22776892c9aad3cedd2f3692d324ff45af1b29fb
treea4613b602bdf1b5b5c21bc1176a3dfb17b61dd92
parent33580692f61e8c0cb540604f6b55abb7bd78df5f
[SLPVectorizer]  Pass the right type argument to getCmpSelInstrCost()

In getEntryCost(), make the scalar type for a compare instruction that of the
operands, not i1. This is needed in order to call getCmpSelInstrCost() for a
compare in a sensible way, the same way as the LoopVectorizer does.

New test: test/Transforms/SLPVectorizer/SystemZ/SLP-cmp-cost-query.ll

Review: Matthew Simpson
https://reviews.llvm.org/D31601

llvm-svn: 300061
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/SystemZ/SLP-cmp-cost-query.ll [new file with mode: 0644]