[LLVMdev] [RFC][PATCH] Adding absd/hadd/sad intrinsics

Renato Golin renato.golin at linaro.org
Tue May 5 06:58:20 PDT 2015


On 4 May 2015 at 08:37, Shahid, Asghar-ahmad
<Asghar-ahmad.Shahid at amd.com> wrote:
> My worry is regarding the query for cost calculation for specific SAD
> instructions such as ‘psad’ (X86) or ‘usad’ (ARM) in Loop Vectorizer.

Hi Shahid,

The vectorizer's cost model has the ability to return different costs
for the same instruction based on the arguments (scalar/vector,
big/small, special cases), so I don't think that adding intrisics will
help you in defining the correct cost. This is true for all other
vectorizer's decisions and it works quite well.

If you find something missing, maybe we should fix the cost model, not
introduce more intrinsics.

cheers,
--renato




More information about the llvm-dev mailing list