[llvm-commits] [llvm] r149216 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86ISelLowering.h X86InstrFragmentsSIMD.td X86InstrXOP.td

Chris Lattner clattner at apple.com
Sun Jan 29 23:42:25 PST 2012


On Jan 29, 2012, at 10:47 PM, Craig Topper wrote:
>> 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.
> 
> I agree that this is a lot better than having all those patterns!
> 
> 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.

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.

> 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?

The later.  Push the complexity into the header file if possible.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120129/d073d5fe/attachment.html>


More information about the llvm-commits mailing list