Shufflevector & InstCombine

Eli Friedman eli.friedman at gmail.com
Fri Aug 9 20:43:01 PDT 2013


On Mon, Aug 5, 2013 at 1:18 PM, James Molloy <james at jamesmolloy.co.uk> wrote:
> Hi Nadav,
>
> Thanks for the quick and unambiguous response.
>
> One thing - I thought the rationale of SelectionDAG was that it did
> optimizations that were implicit in the IR - that is, all optimizations that
> change IR should be done on the IR, and only what's left over (because of
> IR's high level) should be done in DAGCombine.
>
> Has the rationale changed here, or is it just the "least worst" place?

Well, our extremely conservative stance on instcombines for
shufflevectors was before we had TargetTransformInfo... it's possible
we can perform more aggressive transforms if we have cost info.  That
said, keep in mind that for hand-written code, the author is often
smarter than the compiler in terms of how to represent shuffles.

-Eli



More information about the llvm-commits mailing list