[llvm-bugs] [Bug 35299] New: Potential improvement for Loop Vectorization: XMM vs YMM vs ZMM

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 14 03:11:07 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=35299

            Bug ID: 35299
           Summary: Potential improvement for Loop Vectorization: XMM vs
                    YMM vs ZMM
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: serguei.katkov at azul.com
                CC: llvm-bugs at lists.llvm.org

What is motivation to choose the lowest Vectorization Factor for equal vector
cost?

Specifically in LoopVectorizationCostModel::selectVectorizationFactor(unsigned
MaxVF):
  for (unsigned i = 2; i <= MaxVF; i *= 2) {
...
    if (VectorCost < Cost) {
      Cost = VectorCost;
      Width = i;
    }
  }
...
  VectorizationFactor Factor = {Width, (unsigned)(Width * Cost)};
  return Factor;


So we update vectorization factor to higher value only if the cost is strongly
less than previous computed cost.

So if the computed vectorization cost is equal for XMM, YMM and ZMM we always
will use XMM.

So my question is why it is done on this way?
why not to choose the maximum VF for equal cost?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171114/ca5f1eae/attachment-0001.html>


More information about the llvm-bugs mailing list