[llvm-commits] [PATCH] Allow targets to prefer vector splitting over integer promotion
Duncan Sands
baldrick at free.fr
Thu Nov 29 05:57:01 PST 2012
On 29/11/12 14:51, Justin Holewinski wrote:
> I'm not sure how to test this in the general case, so I've merged this with the
> hook implementation in NVPTX and its associated test case. Is this sufficient?
I think it's OK. One comment:
+ return VT.isSimple() && VT.getSimpleVT() == MVT::i1;
I think you can directly do: return VT == MVT::i1;
Ciao, Duncan.
>
>
> On Thu, Nov 29, 2012 at 8:08 AM, Duncan Sands <baldrick at free.fr
> <mailto:baldrick at free.fr>> wrote:
>
> 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 <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/__mailman/listinfo/llvm-commits
> <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
>
> _________________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/__mailman/listinfo/llvm-commits
> <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
>
>
>
> --
>
> Thanks,
>
> Justin Holewinski
>
More information about the llvm-commits
mailing list