[PATCH] Allow vectorization of few missed llvm intrinsic calls in BBVectorizor

Karthik Bhat kv.bhat at samsung.com
Wed Apr 23 21:37:42 PDT 2014


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

http://reviews.llvm.org/D3468






More information about the llvm-commits mailing list