[PATCH] [DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V, C)) -> VECTOR_SHUFFLE

Chandler Carruth chandlerc at google.com
Fri Mar 6 18:58:21 PST 2015


Generally LGTM

On Fri, Mar 6, 2015 at 6:21 PM, Simon Pilgrim <llvm-dev at redking.me.uk>
wrote:

> +    if (isa<ConstantSDNode>(EltNo) && VT == InVec.getValueType() &&
> +        VT.getScalarType() == InVal.getValueType()) {
> +      int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
>

Nit: please use a dyn_cast and a condition variable for the ConstantSDNode
thing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150306/2a6cb2de/attachment.html>


More information about the llvm-commits mailing list