[llvm-commits] [PATCH] Allow targets to prefer vector splitting over integer promotion

Duncan Sands baldrick at free.fr
Thu Nov 29 05:08:35 PST 2012


On 29/11/12 14:01, Justin Holewinski wrote:
> The attached patch adds a new back-end hook that allows targets to prefer vector
> splitting over integer promotion for type legalization.  Right now,
> TargetLowering::computeRegisterProperties() will first try to promote <N x iM>
> to <N x iP> where P > M if <N x iM> is illegal.  However, for some targets, it
> is desirable to instead prefer splitting the vector.
>
> The in-tree use case is the NVPTX back-end.  <N x i1> is not a legal type, but
> promotion to <N x i8> or <N x i32> is not desirable.  Instead, we want to force
> scalarization of vector code using these types (e.g. vselect).

This looks pretty reasonable to me.  However it needs a testcase.

Ciao, Duncan.


>
> --
>
> 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