[PATCH] Improve Cost model for SLPVectorizer when we have a vector division by power of 2

Sanjay Patel spatel at rotateright.com
Fri Aug 22 08:23:56 PDT 2014


Hi Karthik,
We haven't answered the biggest question that I have about this patch:
Can we supply a default cost calculation for SDIV that uses the sra/srl/add/sra sequence that is generated by default by DAGCombiner? If the answer is yes, then all targets will benefit. There should be a way to tie the cost calculation to whatever is implemented in "BuildSDIVPow2()" - so if a target is overriding that, they can also override the default cost calculation if they'd like.

Since you already have LGTM from the other reviewers, I won't hold up this patch, but please add a FIXME comment somewhere if you commit this only for x86 or file a bug so we don't lose track of the issue.

http://reviews.llvm.org/D4971






More information about the llvm-commits mailing list