<br><br><div class="gmail_quote">On Sun, Jan 29, 2012 at 10:29 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><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 Jan 29, 2012, at 10:16 PM, Craig Topper wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;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;font-size:medium"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>> URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=149216&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=149216&view=rev</a><br>> Log:<br>> Move some XOP patterns into instruction definition. Replae VPCMOV intrinsic patterns with custom lowering to a target specific nodes.<br>
<br></div>Hi Craig,<br><br>Would it make sense to replace the intrinsics with something that more closely matches what the code generator wants?  It would be really nice to reduce the # intrinsics and that huge switch.<br>
</blockquote><div><br>Currently we have no code generator support for these instructions. But we were previously wasting an awful lot of patterns on these. Hopefully this is at least better than the patterns.<br></div></span></blockquote>
</div><br></div><div>I agree that this is a lot better than having all those patterns!</div></div></blockquote><div><br>On a related subject, we also have a ton of patterns for VPCMOV right now because we have intrinsics for every vector type, but the opcode itself does a bitwise conditional move based on a mask. The builtins around these intrinsics currently match gcc. How best to simplify this? Custom lower to bitcasts and a target specific node in llvm? Keep the builtins, and type cast to a single intrinsic in CGBuiltins in clang? Put the casts in xopintrin.h and use a single builtin?<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><div><br></div><div><blockquote type="cite">
<span style="border-collapse:separate;font-family:Helvetica;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;font-size:medium"><div>
 I was wondering if it made more sense to do the immediate selection on the clang side?</div></span></blockquote><br></div></div><div>Yeah, I think that would be best.  Clang controls the definition of it's builtins and the corresponding avxintrin.h file, so we can just make the builtins take the immediate, factoring all of this into just a few intrinsics.</div>
</div></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-Chris</div></font></span></div></blockquote></div><br><br clear="all"><br>-- <br>~Craig<br>