[llvm-bugs] [Bug 26082] New: Invariant store should sink to loop exit

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 8 10:04:23 PST 2016


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

            Bug ID: 26082
           Summary: Invariant store should sink to loop exit
           Product: tools
           Version: 3.7
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
          Assignee: unassignedbugs at nondot.org
          Reporter: marksl at synopsys.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The store in the inner loop should be moved to the loop exit block. The test
case is arbitrary. The idiom is common to many DSP kernels.

void test(const int * restrict p_a, const int * restrict p_b, int * restrict
p_z) {
 #pragma clang loop unroll(disable)
 for (int i = 0; i < 10; i++) {
  *p_z = 0;
  #pragma clang loop unroll(disable)
  for (int f=0;f<10;f++)
    *p_z  += *p_a++ * *p_b++ ; //HERE
  p_z++;
 }
}

-- 
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/20160108/f51205f5/attachment.html>


More information about the llvm-bugs mailing list