[llvm-commits] [llvm] r113056 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Sat Sep 4 02:45:24 PDT 2010


On Sat, Sep 4, 2010 at 12:44 AM, Eric Christopher <echristo at apple.com> wrote:
>
> On Sep 3, 2010, at 7:36 PM, Bruno Cardoso Lopes wrote:
>
>>   bool HasSSE2 = Subtarget->hasSSE2() || Subtarget->hasAVX();
>>   bool HasSSE3 = Subtarget->hasSSE3() || Subtarget->hasAVX();
>> +  bool HasSSSE3 = Subtarget->hasSSSE3() || Subtarget->hasAVX();
>
> I understand it's probably just a side effect, but
>
> "HasSSE2" = "HasSSE2 or this other thing"
>
> reads somewhat oddly :)

Yep, we need to incorporate somehow the AVX with SSE levels, but in
a way that we can select the disjoint set of them - selecting only
AVX stuff when AVX is turned on (since AVX contains a version of all
128-bit SSE instructions). We try to emulate that right now during isel
by defining:

def HasSSE3 : Predicate<"Subtarget->hasSSE3() && !Subtarget->hasAVX()">;

There's a FIXME there explaining why!
Anyway, better approaches are always welcome! :)

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-commits mailing list