[LLVMdev] AVX Shuffles & PatLeaf Help Needed

David Greene dag at cray.com
Thu Dec 17 15:30:19 PST 2009

On Thursday 17 December 2009 17:16, Nate Begeman wrote:

> David, this is probably the wrong approach, based on the accreted awfulness
> of the X86 shuffle lowering code, 

Ha!  I have no issue believing this statement.  :)

> The correct approach is probably a rewrite based around what
> AltiVec does: Canonicalize to byte ops, and write all the patterns once
> rather than having to look for 6 different variants of the same pattern.

Can you expand on this with an example?  There seems to be an awful lot of
shuffle patterns and predicates in PPCInstrAltivec.td.  What do you mean by, 
"Canonicalize to byte ops?"  Can you walk me through how that works with 

Since I'm rewriting all of the SSE patterns to clean them up and incorporate 
AVX functionality anyway, a complete rewrite of shuffles is not additional 
work.  :)



More information about the llvm-dev mailing list