SLPVectorizer call to getCmpSelInstrCost()

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 1 02:21:48 PDT 2017


Hi,

I found that the SLP vectorizer does not call getCmpSelInstrCost() for a 
compare with the proper type. It currently passes i1 or a vector of i1s, 
instead of the type of the compare operand, like LoopVectorizer does.

My patch fixes this by getting the right scalar type for compares. No 
regressions after applying this patch. I don't have a test case, as I am 
waiting to finalize the patch for SystemZ cost functions, which is not 
yet in place.

/Jonas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SLPVec_getCmpSelInstrCost_call.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170401/85945a79/attachment.bin>


More information about the llvm-commits mailing list