[PATCH] Add support to vectorize ctlz, cttz and powi intrinsics in SLPVectorizer

Nadav Rotem nrotem at apple.com
Thu May 22 09:02:24 PDT 2014


Karthik, 

Please add a testcase for one of the functions where the last argument is different and the SLPvectorizer is unable to vectorize the function. 

Thanks,
Nadav

On May 21, 2014, at 11:40 PM, Karthik Bhat <kv.bhat at samsung.com> wrote:

> Hi All,
> First of sorry my last reply from my id seems to have introduced some junk char in the mail chain.
> 
> I have updated the patch to directly compare Value* instead of comparing SCEV as per comments.
> As Nick mentioned the above mentioned IR example may not be generated when compiling with optimizations as gvn,cse,basicaa and dce would have removed these redundant code. 
> The above mentioned IR was handcoded to highlight the benifit of using SCEV but as the basic transforms such as gvn,cse etc runs before vectorization this may not be required.
> 
> I have updated the patch accordingly to directly compare arguments instead of SCEV. Does this look good to commit?
> 
> Thanks
> Karthik Bhat
> 
> http://reviews.llvm.org/D3851
> 
> Files:
>  include/llvm/Transforms/Utils/VectorUtils.h
>  lib/Transforms/Vectorize/SLPVectorizer.cpp
>  test/Transforms/SLPVectorizer/X86/intrinsic.ll
> <D3851.9678.patch>




More information about the llvm-commits mailing list