<div>On Thu, Feb 21, 2013 at 12:14 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word">You can change the input LLVM-IR. <div><br></div><div><div><div><div><div>On Feb 21, 2013, at 7:16 AM, "Nowicki, Tyler" <<a href="mailto:tyler.nowicki@intel.com" target="_blank">tyler.nowicki@intel.com</a>> wrote:</div>

<br></div></div><blockquote type="cite"><div><div>





<div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am interested in evaluating the performance of packed vs scalar double-precision floating point instructions on x86-atom and I was wondering if anyone knows more precisely where to modify llvm to use one or the other. I know I probably
 need to change something in the type legalizer. Could anyone provide more details than that?<u></u><u></u></p><p class="MsoNormal"><u></u> </p></div></div></div></div></blockquote></div></div></div></blockquote><div>Hey Tyler,</div>

<div><br></div><div>Nadav is correct. Un-vectorizing would best be done before the IR level.</div><div><br></div><div>If one split the vectors at the ISel level, one would incur unnecessary extracts, which would skew the timing data.</div>

<div><br></div><div>To digress a bit, I've found that it's necessary to rewrite the scalar SSE patterns to accept true scalar operands; not fake vector operands like the GNU built-ins. This topic was discussed a while back and the popular belief is that partial register updates would cause a performance hit when operating on true scalars. However, my empirical evidence suggests that the extra memory traffic of stuffing vectors is more of a performance hit than the partial register updates. Unfortunately, this is counter-intuitive to the documentation available. And, this may only be true for the benchmarks that hold my interest.</div>

<div><br></div><div>For completeness, I'm mainly interested in Interlagos and Sandybridge, so this <span style="color:rgb(33,33,33);font-family:arial,sans-serif;line-height:15px;background-color:rgb(255,255,255)">conjecture</span> may not hold for other processors such as Atom.</div>
<div><br></div><div>Hope this helps,</div><div>Cameron</div><div>
 </div></div></div>