Hi Hal,
I'm currently going through and trying to understand BB Vectorizer while doing so i found that few llvm intrinsic function calls which can be vectorized are missed in the switch case of isVectorizableIntrinsic as a result these intrinsic functions are not getting vectorized. This patch modifies isVectorizableIntrinsic function and covers these intrinsic functions in the switch case so that they get vectorized.
Does this patch look good to commit?
Thanks
Karthik Bhat
Details
- Reviewers
karthikthecool hfinkel
Diff Detail
Event Timeline
Hi Eric,
Yes i think we can vectorize bswap as well as other bitmap manipulation intrinsics such as cttz,ctlz etc. But i think these cannot be classified as VectorizeMath as this flag is for floating-point math intrinsics.
To handle bitmap manipulation intrinsics (e.g. bsap,cttz,ctlz) we might have to add a new flag and support to enable/disable it from command line in BB Vectorizor.
Some flag like *VectorizeBitManipulations* and a command line support to enable/disable it such as -
static cl::opt<bool> NoBitManipulation("bb-vectorize-no-bitmanip", cl::init(false), cl::Hidden, cl::desc("Don't try to vectorize BitManipulation intrinsics"));
Does it look like the correct approach? I will update the patch to support bitmap manipulation intrinsics if you feel this approach is ok.
Thanks
Karthik Bhat
Thanks Hal, Committed as r207085.
Hal,Eric i will shortly follow up with a patch vectorizing bit intrinsics.
Thanks
Karthik Bhat