<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Hi, 
<div dir="auto"><br>
</div>
<div dir="auto">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? </div>
<div dir="auto"><br>
</div>
<div dir="auto">I see code that checks for isPowOf2 for vectors in </div>
<div dir="auto"><br>
</div>
<div dir="auto"><a href="https://github.com/llvm-mirror/llvm/tree/master/lib" style="">lib</a><span style="margin: 0px 0.25em;">/</span><a href="https://github.com/llvm-mirror/llvm/tree/master/lib/CodeGen" style="">CodeGen</a><span style="margin: 0px 0.25em;">/</span>TargetLoweringBase.cpp<br>
</div>
<div dir="auto">
<pre style="word-wrap: normal; margin-top: 0px; margin-bottom: 0px; padding: 15px 0px;"><div style="padding: 0px 15px;">// FIXME: We don't support non-power-of-2-sized vectors for now.  Ideally we</div><div style="padding: 0px 15px;">  // could break down into LHS/RHS like LegalizeDAG does.</div><div style="padding: 0px 15px;">  if (!isPowerOf2_32(NumElts)) {<!-- --></div><div style="padding: 0px 15px;">    NumVectorRegs = NumElts;</div><div style="padding: 0px 15px;">    NumElts = 1;</div><div style="padding: 0px 15px;">  }</div><div style="padding: 0px 15px;" dir="auto"><br></div><div style="padding: 0px 15px;" dir="auto"><br></div><div style="padding: 0px 15px;" dir="auto">Any suggestions on how to support non-power-of-2-sized vectors? Or maybe a workaround?<br></div><div style="padding: 0px 15px;" dir="auto"><br></div><div style="padding: 0px 15px;" dir="auto">Thanks,</div><div style="padding: 0px 15px;" dir="auto">-Kevin</div></pre>
</div>
</div>
</body>
</html>