<div class="gmail_quote">On Thu, Jan 5, 2012 at 1:53 AM, Umansky, Victor <span dir="ltr"><<a href="mailto:victor.umansky@intel.com">victor.umansky@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Well, if it would be possible to change LLVM intrinsic prototype – then you’re right, no instruction combining were required.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">However until this will be done in LLVM spec – the optimization is in place.</span></p></blockquote>
</div><br><div>There is no spec, it is a change to LLVM's intrinsics, you can post a patch to do this to this mailing list. =] You need to change the intrinsic definition, update any code that reasons about that intrinsic, add auto-upgrade logic to upgrade old IR inputs from the old intrinsic to the new intrinsic, and teach the frontends to emit the new one. It's a fair amount of code, but none of it hard.</div>
<div><br></div><div>Please don't leave bad code checked into the codegen layer. We need to fix this the correct way if/when we find the correct way to fix it. Thus far, updating the LLVM intrinsics is looking very promising.</div>