[llvm-bugs] [Bug 25336] New: [LICM] Redundant store should be moved to loop post-dominator

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 28 06:34:49 PDT 2015


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

            Bug ID: 25336
           Summary: [LICM] Redundant store should be moved to loop
                    post-dominator
           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

In r251512, I added a test case that was similar to the following:

void test16(unsigned *f) {
  for (int i = 65536; i >= 0; i--) {
     f[i] = 0;
     f[65536] = 1;
  }
}

Currently, we write f[65536] on every iteration of the loop.  It seems like it
would be possible to push the invariant store out of the loop and transform the
code into something like:

void test16(unsigned *f) {
  for (int i = 65536; i >= 0; i--) {
     f[i] = 0;
  }
  f[65536] = 1;
}

This is a contrived test case, but I thought it was worth making a note.

-- 
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/20151028/46c2eb0c/attachment-0001.html>


More information about the llvm-bugs mailing list