[llvm-bugs] [Bug 46460] New: [DSE] Stores not eliminated if they are overwritten in a loop.
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu Jun 25 09:18:43 PDT 2020
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=46460
            Bug ID: 46460
           Summary: [DSE] Stores not eliminated if they are overwritten in
                    a loop.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: florian_hahn at apple.com
                CC: llvm-bugs at lists.llvm.org
In the example below, LLVM currently does not eliminate the stores in the
second loop, even though the second loop exactly overwrites the stores of the
first loop. Similarly the first loop could be replaced by a memcpy and we still
not remove it:
https://godbolt.org/z/kGBEXS
void init(int *P, unsigned N) {
   for (unsigned i = 0; i < N; i++)
        P[i] = 1;
    for (unsigned i = 0; i < N; i++)
        P[i] = 1;
}
-- 
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/20200625/48925221/attachment.html>
    
    
More information about the llvm-bugs
mailing list