[PATCH] SROA: extract instead of shuffle when performing vector/array type punning
chandlerc at gmail.com
Sat Feb 7 21:28:46 PST 2015
On Sat, Feb 7, 2015 at 5:16 PM, JF Bastien <jfb at chromium.org> wrote:
> Hi chandlerc, jvoung,
> The resulting code is shorter and simpler to optimize. The existing code
> was more general, and still serves as the fallback case when the incoming
> vector type and the outgoing scalar are incompatible. This code should
> trigger more often than through type punning, but that's the user code I
> saw it trigger on.
Not sure this is the right approach. It is a lot of complexity, and we
still have the fallback.
Have you looked at teaching instcombine to transform the code produced by
SROA today into the element extract? That would seem a better layering at
the least, although I'm still on the fence about whether we want to in
general perform this operation.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits