<div dir="ltr">On 7 June 2013 15:41, Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@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 class="im"><span style="color:rgb(34,34,34)">We don’t want to encode backend knowledge into the vectorizer (i.e. don’t vectorize type X because the backend does not support it).</span></div>
</blockquote><div><br></div><div>We already do, via the cost table. This case is no different. It might not be the best choice, but it is how the cost table is being built over the last months.<br></div><div><br></div><div>
<br></div><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 class="im"><span style="color:rgb(34,34,34)"> The only way to get this result is indirectly via the cost model but the backend must still support vectorized IR (it is part of the language) via scalarization.</span></div>
</blockquote><div><br></div><div style>Absolutely! There are two problems to solve: increase the cost for SPFP when <span style="font-family:arial,sans-serif;font-size:13px">UseNEONForSinglePrecisionFP is false, so that vectorizers don't generate such code, and legalize correctly in the backend, for vector code that does not respect that flag.</span></div>
<div><br></div><div><br></div><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 class="im"><span style="color:rgb(34,34,34)">(You can of course assign UMAX cost for all floating point vector types in the cost model for ARM and get the desired result - this won’t solve the problem if somebody else writes the vectorize LLVM IR though)</span></div>
</blockquote><div></div></div><br></div><div class="gmail_extra" style>I wouldn't use UMAX, since the idea is not to forbid, but to tell how expensive it is. But it would be a big number, yes. ;)</div><div class="gmail_extra" style>
<br></div><div class="gmail_extra" style>cheers,</div><div class="gmail_extra" style>--renato</div></div>