<div dir="ltr">On 10 January 2013 23:00, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">Some of the costs for the arithmetic operations should be handled automatically by the BasicTTI (which asks TartetLowering if the type and operations are legal). We need to have cost tables for things like "trunk <4 x i64> to <4 x i8>" because even TLI does not know how custom operations gets lowered. <br>
</div></blockquote><div><br></div><div style>BasicTTI::getCastInstrCost() assumes that they're free, which is probably so that it returns something that doesn't break the cost model.</div><div style><br></div><div style>
I can see the X86 table in X86TTI::getCastInstrCost(), are you expecting something similar? I shall investigate all possible combinations and try to build a similar model.</div><div style><br></div><div style>That also means we should re-using the X86TypeConversionCostTblEntry as a more generic structure?</div>
<div style><br></div><div style>cheers,</div><div style>--renato</div></div></div></div>