[PATCH] Optimize sext 4xi8,4xi16 to 4xi64

Nadav Rotem nrotem at apple.com
Tue Mar 5 12:58:13 PST 2013


On Mar 5, 2013, at 12:47 PM, Muhammad Tauqir Ahmad <muhammad.t.ahmad at intel.com> wrote:

> The costs for the sign-extend pairs covered by this patch were added
> by Elena Demikhovsky but I am not sure how accurate they need to be
> and since the previous sequence produced 8 instructions, each
> instruction dependant on the previous, and the cost was 8 -- now 6
> instructions are being generated, each instruction dependant on the
> previous, can I just update the costs to 6?
> 
> In other words, is it arbitrary? Is the above "accurate enough" for
> our purposes assuming a relative scale is being used?


Yes, it needs to be a good estimate. I haven't looked at the assembly sequence but 6 sounds like a reasonable number. You can use Intel's IACA[1] tool to get more accurate numbers. Having said that, your code sequence will be mixed with other instructions so its impossible to estimate execution ports pressure, front-end pressure etc. 

[1] http://software.intel.com/en-us/articles/intel-architecture-code-analyzer 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130305/5ff17eca/attachment.html>


More information about the llvm-commits mailing list