diff options
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index eadfa1fbb29..2be31c82601 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -364,6 +364,13 @@ unsigned TargetLowering::getVectorTypeBreakdown(MVT::ValueType VT,    unsigned NumVectorRegs = 1; +  // FIXME: We don't support non-power-of-2-sized vectors for now.  Ideally we  +  // could break down into LHS/RHS like LegalizeDAG does. +  if (!isPowerOf2_32(NumElts)) { +    NumVectorRegs = NumElts; +    NumElts = 1; +  } +      // Divide the input until we get to a supported size.  This will always    // end with a scalar if the target doesn't support vectors.    while (NumElts > 1 && | 

