<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 - [MCA][ARM] Assertion failed regarding CarryOver value in the DispatchStage"
   href="https://bugs.llvm.org/show_bug.cgi?id=50174">50174</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MCA][ARM] Assertion failed regarding CarryOver value in the DispatchStage
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </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>llvm-mca
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>minyihh@uci.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>andrea.dibiagio@gmail.com, llvm-bugs@lists.llvm.org, matthew.davis@sony.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,
When I use the following two instructions as the input:
```
        pop     {r3, r4, r5, r6, r7, pc}
        nop
```
With the following command:
```
$ llvm-mca -mtriple="thumbv7-gnueabihf-linux" -mcpu="cortex-a57" input.s
```

MCA crashes with the following message:
```
llvm-mca: /path/to/llvm-project/llvm/lib/MCA/Stages/DispatchStage.cpp:79:
llvm::Error llvm::mca::DispatchStage::dispatch(llvm::mca::InstRef): Assertion
`!CarryOver && "Cannot dispatch another instruction!"' failed.
```

After digging into it a little bit, I think the problem is that EntryStage
should wait until DispatchStage finish all its carried-over micro-ops (i.e.
until CarryOver == 0) before pumping in another instruction. Originally the
pipeline uses `isAvailable` method in each stage to implement this flow control
/ guard. But `DispatchStage::isAvailable` seems to fail in this case.</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>