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

Craig Topper craig.topper at gmail.com
Sun Jan 29 22:47:38 PST 2012


On Sun, Jan 29, 2012 at 10:29 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Jan 29, 2012, at 10:16 PM, Craig Topper wrote:
>
> > URL: http://llvm.org/viewvc/llvm-project?rev=149216&view=rev
>> > Log:
>> > Move some XOP patterns into instruction definition. Replae VPCMOV
>> intrinsic patterns with custom lowering to a target specific nodes.
>>
>> Hi Craig,
>>
>> 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.
>>
>
> 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. 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?


>  I was wondering if it made more sense to do the immediate selection on
> the clang side?
>
>
> 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.
>

> -Chris
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120129/7b4756a1/attachment.html>


More information about the llvm-commits mailing list