[llvm-dev] Llvm support for non-power-of-2-sized vectors
    kevin lin via llvm-dev 
    llvm-dev at lists.llvm.org
       
    Mon Jan 29 12:12:50 PST 2018
    
    
  
Hi,
My target can support non-power-of-2-sized vectors. My first thought is to add the non-power-of-2 vector type to the function  MVT::getVectorVT in MachineValueType.h, is this the correct approach?
I see code that checks for isPowOf2 for vectors in
lib<https://github.com/llvm-mirror/llvm/tree/master/lib>/CodeGen<https://github.com/llvm-mirror/llvm/tree/master/lib/CodeGen>/TargetLoweringBase.cpp
// 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;
  }
Any suggestions on how to support non-power-of-2-sized vectors? Or maybe a workaround?
Thanks,
-Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180129/1e770bc8/attachment.html>
    
    
More information about the llvm-dev
mailing list