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

            Bug ID: 48141
           Summary: LICM cannot sink stores out of loops when address
                    calculation is a bit complicated
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: roy.yan....@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 24145
  --> https://bugs.llvm.org/attachment.cgi?id=24145&action=edit
testcase

For the stores *(float *restrict)(&c_Re[(i+n)*(608)+j+m]) = ..., the compiler
should be able to sink these stores out of the loop indexed by k. Since the
loop indexed by m and n are completely unrolled, the address calculation is
reduced to i*608+j+CONSTANT. If we add #pragma unroll(3) to the loop indexed by
i, these stores are sunk, my guess here is that i becomes a constant, thus now
the address is j+CONSTANT', which is easy to be analyzed in alias analysis.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to