On Wed, Nov 14, 2012 at 1:02 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br><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"><div class="im"><br><div><div>On Nov 14, 2012, at 9:53 AM, Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">I'm also looking into adding intrinsics for supporting ceil, trunc, rint, and nearbyint for vectors. The ISD nodes exist already but they currently only get created for scalar types when libcalls are lowered. So if you want to go ahead and do the right thing for FCEIL, FTRUNC, FRINT, FNEARBYINT of vectors while you're in there.</span></blockquote>
</div><br></div><div>On a tangential note, it's a pet peeve of mine that some of these nodes are on accessible from libcall lowering, which is a very C-centric optimization pass.  IMO, they should all have corresponding intrinsics that map directly onto them, so that they can be more readily accessed from languages that don't want to be restricted to C's nomenclature.  Plus, the libcall lowering becomes simpler: it just transforms the libcall to the intrinsic call.</div>
</div></blockquote><div><br></div><div>I was going to make the intrinsics work for scalar types too just like the existing llvm.floor. May also do the others like sin, cos, exp, log, etc. Was starting with the rounding ones specifically so I could support them with roundps/pd on x86.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="HOEnZb"><font color="#888888"><div><br></div><div>--Owen</div>
</font></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>~Craig<br>