<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 29, 2012, at 10:47 PM, Craig Topper wrote:</div><blockquote type="cite"><div class="gmail_quote"><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; position: static; z-index: auto; "><div style="word-wrap:break-word"><div class="im"><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>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. </div></div></blockquote><div><br></div><div>Ick.  It is occasionally convenient to use the same builtins as GCC (e.g. the gcc_builtin logic), but not if it makes the compiler more gross.  It sounds like these should all be merged into a single builtin.  Matching GCC's vector __builtin's is a non-goal, and we already deviate strongly from it in the SSE and ARM intrinsics.</div><br><blockquote type="cite"><div class="gmail_quote"><div>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></div></div></blockquote><div><br></div>The later.  Push the complexity into the header file if possible.</div><div><br></div><div>-Chris</div></body></html>