[llvm-commits] [PATCH] Teach DAGTypeLegalizer how to handle VSELECT operands

Duncan Sands baldrick at free.fr
Thu Nov 29 05:52:51 PST 2012


Hi Justin,

On 29/11/12 14:07, Justin Holewinski wrote:
> The attached patch teaches DAGTypeLegalizer how to handle VSELECT operands.  We
> are hitting an assert in SplitVectorOperand() when it tries to visit the operand
> of a VSELECT, and this patch fixes that.

you need to split because the condition operand is not legal, right?
And presumably that's because you want to split vectors of boolean
(as in the patch you just sent in) rather than promoting them.
It's impossible for the other operands to be illegal, since they must
have the same type as the result type, and if the result type was illegal
then it would have been split already during result legalization (result
legalization happens before operand legalization).  So can you please assert
that OpNo is zero.  In addition LoNumElts and HiNumElts must be equal since
splitting is always in two, so how about an assertion that they are equal.
Also, please add a testcase.  Otherwise LGTM.

Ciao, Duncan.




>
> We handle the splitting by splitting the entire VSELECT operation using
> EXTRACT_SUBVECTOR.
>
> --
>
> Thanks,
>
> Justin Holewinski
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list