[llvm-bugs] [Bug 25520] New: [LIR] Add support for structs and unrolled loops

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 13 05:36:26 PST 2015


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

            Bug ID: 25520
           Summary: [LIR] Add support for structs and unrolled loops
           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

The current implementation of LIR isn't able to convert the below example into
a memset.

typedef struct foo {
  int a;
  int b;
} foo_t;

void bar(foo_t *f, unsigned n) {
  for (unsigned i = 0; i < n; ++i) {
    f[i].a = 0;
    f[i].b = 0;
  }
}

It will also fail on hand unrolled loops like the following:

void test(foo_t *f, unsigned n) {
  for (unsigned i = 0; i < n; i += 2) {
    f[i] = 0;
    f[i+1] = 0;
  }
}

We should be able to handle arbitrary structs and hand unrolled loops.

-- 
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/20151113/ecaa267a/attachment.html>


More information about the llvm-bugs mailing list