[llvm-commits] [PATCH] extend fix to PR12312 to support 256-bit vector
Michael Liao
michael.liao at intel.com
Mon Sep 10 11:11:26 PDT 2012
Here is the revised/separate patch fixing type legalization. Test case
is added as well.
Yours
- Michael
On Thu, 2012-09-06 at 09:50 -0700, Michael Liao wrote:
> On Thu, 2012-09-06 at 09:59 +0200, Duncan Sands wrote:
> > Hi Michael,
> >
> > > --- a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
> > > +++ b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
> > > @@ -108,6 +108,47 @@ void DAGTypeLegalizer::ExpandRes_BITCAST(SDNode *N, SDValue &Lo, SDValue &Hi) {
> > >
> > > return;
> > > }
> > > +
> > > + // If <NOutVT x 2> is not a legal type, try <ExtOutVT x (2*f)>, where
> > > + // f = bits(NOutVT)/bits(ExtOutVT).
> > > + EVT ExtOutVT = TLI.getTypeToExpandTo(*DAG.getContext(), OutVT);
> >
> > I'm confused - isn't ExtOutVT equal to NOutVT?
>
> NOutVT is calculated from TLI.getTypeToTransformTo(), roughtly from
> N-bit integer to N/2 interger and the result type is not necessarily
> legal.
>
> ExtOutVT is calculated from TLI.getTypeToExpandTo() and the result is
> guaranteed to be legal and it's the largest type.
>
> Yours
> - Michael
>
> >
> > Ciao, Duncan.
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enhance-type-legalization-of-bitcast-from-vector-to-.patch
Type: text/x-patch
Size: 3668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120910/7b626387/attachment.bin>
More information about the llvm-commits
mailing list