[PATCH] Improve Cost model for SLPVectorizer when we have a vector division by power of 2
Andrea Di Biagio
Andrea_DiBiagio at sn.scee.net
Fri Aug 22 02:58:57 PDT 2014
Patch LGTM. Thanks!
>>! In D4971#33, @karthikthecool wrote:
> Hi Andrea,Sanjay,
> It seems like i missed out on some intresting discussion yesterday.
> Updating the patch addressing Andrea and Sanjay's comments.
>
> Intrestingly yes UDIV by power of 2 is actually coverted into SRL before it reaches vectorization code so i think checking for UDIV with power of 2 is as good as dead code here. Removed the same.
>
> Opd1PropInfo,Opd2PropInfo actually doesn't effect cost of Instruction::AShr,Instruction::LShr,Instruction::Add as it is used only by SDIV. Having said that i agree it is incorrect to pass old property while getting the cost although they are not used as of now. So updated it to use OP_None.
>
> Updated formatting comments given by Sanjay.
> Since now we are only checking for signed division by power of 2 the existing test cases should suffice?
>
> Thanks again for your interest in the patch. Does this now look good to commit?
>
> Thanks and Regards
> Karthik Bhat
http://reviews.llvm.org/D4971
More information about the llvm-commits
mailing list