<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Polly] Loop invariant code hoisting conflicts with generation of escaping values"
   href="https://llvm.org/bugs/show_bug.cgi?id=25312">25312</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Polly] Loop invariant code hoisting conflicts with generation of escaping values
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Projects
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tobias@grosser.es
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15157" name="attach_15157" title="Test case">attachment 15157</a> <a href="attachment.cgi?id=15157&action=edit" title="Test case">[details]</a></span>
Test case

With r251231 polly-opt -polly-codegen -polly-process-unprofitable generates
invalid IR. The reason for this is that the current escaping value code
generation assumes ScopArrayInfo objects are not changed (and still refer to
the values in the original scop), but the loop invariant code hosting changes
the BasePtr of i32 MemRef_tmp14[*] to "MemRef_arg".

Disabling loop invariant hoisting fixes this issue.

I was myself surprised we change the BasePtr of ScopArrayInfo objects in the
IslNodeBuilder. I wonder if we could find a solution that retains the original
BasePtr and possibly adds an additional LoopInvariant baseptr to the
ScopArrayInfo which can be used at the places that need it.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>