[llvm-bugs] [Bug 30472] New: [LoopInterchange] Missed optimization with no dependencies.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 21 06:47:27 PDT 2016


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

            Bug ID: 30472
           Summary: [LoopInterchange] Missed optimization with no
                    dependencies.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: mcrosier at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

If I'm not mistaken, we should be able to interchange the below loop, but we
currently don't.

unsigned no_deps_interchange(unsigned **Arr, unsigned k) {
  unsigned sum = 0;
  for (int i = 0; i < 1024; ++i)
    for(int j = 0; j < 1024; ++j)
      sum += Arr[j][i] + k;
  return sum;
}

The first issue is that we bail from loop interchange if we don't find any
dependencies (i.e., DepMatrix.size() == 0).

-- 
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/20160921/716e1351/attachment.html>


More information about the llvm-bugs mailing list