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

Chris Lattner clattner at apple.com
Tue Mar 30 11:32:08 PDT 2010


On Mar 30, 2010, at 11:29 AM, Eric Christopher wrote:

>>> 
>>> Basic idea is that loop is canonicalizing all loads (etc) to v2i64.  This means that to match we've got some weird casts around that wouldn't need to be there if we just left them as whatever type they were.
>>> 
>>> This is why we see, for example, the bc_v4i32 cast used all over the place in X86InstrSSE.td for things not sse2 to get them to match.
>> 
>> But we do this for a really good reason.  Canonicalization is important because without it, we have to write all patterns for all possible load types.
> 
> or assume that the casts are relatively free I guess. Maybe we can rewrite the memopvXXX patterns to autoload from v2i64 and bc to what we want instead of needing to explicitly bc.
> 
> Guess it was largely a note of "think of how to do this better".

I recently made tblgen ignore noop bitcasts in .td files.  This means that the .td file could write the sse load as a patfrag like this:

(bitconvert (v2i64 (load ...)))

when used in a context that is already v2i64, the bitconvert would go away.

-Chris



More information about the llvm-commits mailing list