<div dir="ltr">Hi Nadav,<div><br></div><div>I'm not very familiar with the cost model part, but I couldn't find proper places that I have to change:</div><div>I'm assuming you're talking about getCmpSelInstrCost() in X86TargetTransformInfo, is this right?</div>
<div><br></div><div>If so, the function only seems to get the types of the instruction's condition and result, not the proper arguments.</div><div>If we don't get the arguments, we can't be sure if this will be a cheap vselect.</div>
<div><br></div><div>Even with that, the BaseTargetTransformInfo only cares about nodes set to Expand. All other nodes' cost (Legal, Custom, Promote) are the type legalization cost + 1 (BasicTargetTransformInfo.cpp:445).</div>
<div>X86TargetTransformInfo.cpp:576 has the X86 specialization, but this one just adds what's on the cost table to the type legalization. I don't think it's really needed to add cost table entries just to, in the end, have the same behaviour as we now have.</div>
<div><br></div><div>I also added a test for the costs to lower a vselect, since we had none. But I can commit it without the table changes.</div><div>What do you think? I have the tables ready to commit anyway, but I don't think we need to.<br>
</div><div><br></div><div> Filipe</div><div><br></div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 14, 2014 at 2:49 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Excellent. Please update the cost model as well.<br>
<br>
Thanks :)<br>
<br>
</div><a href="http://reviews.llvm.org/D3752" target="_blank">http://reviews.llvm.org/D3752</a><br>
<br>
<br>
</blockquote></div><br></div>