[llvm-commits] [PATCH] extend fix to PR12312 to support 256-bit vector

Michael Liao michael.liao at intel.com
Thu Sep 6 09:50:51 PDT 2012


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





More information about the llvm-commits mailing list