[PATCH] Teach the DAGCombiner how to fold a OR of two shufflevector into a single shufflevector node

Tim Northover t.p.northover at gmail.com
Wed Mar 5 11:50:49 PST 2014


Hi Nadav,

> Thanks for working on this.  Lowering shuffles is really difficult and we
> have >1000 LOC in the x86 backends for lowering shuffles.  It is really
> difficult to predict which shuffles are supported and which patterns result
> in slow code. Until now LLVM was *not* to introducing new shuffle patterns.

What do we count as new shuffle patterns here? I've been working on
InstCombine recently, trying to make it more flexible about how it
turns insertelement/extractelements into shuffles. (The limitation I'm
trying to get around is that it will form any shuffle it can, but only
if the input and output vector types are the same).

I'm now slightly worried that we don't want to do this even when I do
get it working, but on the other hand the class already produced is
hardly backend-friendly.

Cheers.

Tim.



More information about the llvm-commits mailing list