<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - MIR's -run-pass together with -verify-machineinstrs has strange behavior with function properties"
   href="https://bugs.llvm.org/show_bug.cgi?id=38439">38439</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MIR's -run-pass together with -verify-machineinstrs has strange behavior with function properties
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>francisvm@yahoo.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Assuming you have this test case:

body:
  $rax = TARGET_PSEUDO

then the MIR parser will add NoPHIs, IsSSA and NoVRegs function properties.

If you run llc -run-pass expand-isel-pseudos -verify-machineinstrs, where
expand-isel-pseudos will expand TARGET_PSEUDO by adding either PHIs or vregs,
the machine verifier will complain about the function not respecting the NoPHIs
and NoVRegs properties.

I am not sure what the correct behavior should be here, but we should be able
to somehow force it in the MIR file so that we don't have to add actual PHI MIs
to the test.

A few possibilities:

* Properly implement
getClearedProperties/getSetProperties/getRequiredProperties for all the passes.
One issue here is that in the case of passes that call into backends, we don't
know the hooks will insert, so we'll end up clearing most of the properties in
many cases.
* Set/reset the properties from every pass including all the backend hooks.
* Add MIR keys that force the properties for the whole file.</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>