I'm not sure how to test this in the general case, so I've merged this with the hook implementation in NVPTX and its associated test case.  Is this sufficient?<div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Nov 29, 2012 at 8:08 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 29/11/12 14:01, Justin Holewinski wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The attached patch adds a new back-end hook that allows targets to prefer vector<br>
splitting over integer promotion for type legalization.  Right now,<br>
TargetLowering::<u></u>computeRegisterProperties() will first try to promote <N x iM><br>
to <N x iP> where P > M if <N x iM> is illegal.  However, for some targets, it<br>
is desirable to instead prefer splitting the vector.<br>
<br>
The in-tree use case is the NVPTX back-end.  <N x i1> is not a legal type, but<br>
promotion to <N x i8> or <N x i32> is not desirable.  Instead, we want to force<br>
scalarization of vector code using these types (e.g. vselect).<br>
</blockquote>
<br></div></div>
This looks pretty reasonable to me.  However it needs a testcase.<br>
<br>
Ciao, Duncan.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
<br>
Thanks,<br>
<br>
Justin Holewinski<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</div>