[PATCH] Add support to vectorize ctlz, cttz and powi intrinsics in SLPVectorizer
Arnold Schwaighofer
aschwaighofer at apple.com
Thu May 22 09:39:10 PDT 2014
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:983
@@ +982,3 @@
+ ID == Intrinsic::powi) {
+ Value *A1J = CI2->getArgOperand(1);
+ if (A1I != A1J) {
----------------
The code is repeated three times in this file and likely will make it into the loop vectorizer, too. Can this be refactor into a utility function 'bool hasVectorInstrinsicScalarOpd(ID, unsigned &ScalarOpdIdx)' in VectorUtils.h? (once we have instructions with more than one operand we can change this to be a vector of operands but there is no need now I think)
http://reviews.llvm.org/D3851
More information about the llvm-commits
mailing list