<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] Bailing out during codegen of loop-invariant loads breaks scop"
   href="https://llvm.org/bugs/show_bug.cgi?id=25447">25447</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Polly] Bailing out during codegen of loop-invariant loads breaks scop
          </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=15246" name="attach_15246" title="Test case">attachment 15246</a> <a href="attachment.cgi?id=15246&action=edit" title="Test case">[details]</a></span>
Test case

With r252412 the command polly-opt bailing-out-breaks-scop.ll -polly-codegen
-polly-process-unprofitable fails as follows:

Instruction does not dominate all uses:
  -> operand:   %tmp26.ph = phi i1 [ undef, %bb24 ], [ false, %bb16 ], [ false,
%bb21 ]
  -> operand in bb: label %bb25.region_exiting
  -> operand in func: barney
  -> inst:   %tmp26 = phi i1 [ %tmp26.ph, %polly.merge_new_and_old ]
  -> inst in bb: label %bb25
  -> inst in func: barney

The reason for this error is that at the point we bail out, Polly already split
the code into an optimized and unoptimized branch, but did not yet generate the
PHI nodes that merge values defined in the original code with the corresponding
values in the newly generated code (such values and stack slots do not even
exist yet). As a result, uses after the scop reference values in the original
code that do not dominate them after the code has been split.

Also, when bailing out early we do not verify the generated IR any more.</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>