<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56052>56052</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            PPCTLSDynamicCall does not preserve LiveIntervals
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:PowerPC
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jayfoad
      </td>
    </tr>
</table>

<pre>
    See https://reviews.llvm.org/D127731 WIP: [MachineVerifier] Try harder to verify analyses

If I apply just the MachineVerifier part of this patch then I see a couple of problems in the PowerPC CodeGen tests:

First they all fail with `Assertion `AnalysisPass && "Expected analysis pass to exist."' failed`. This has been discussed before on the mailing lists, and can be fixed with a patch like this:
```
diff --git a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
index fbd487fbcfd5..28927280c8fc 100644
--- a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
@@ -218,6 +218,7 @@ public:
     void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addRequired<LiveIntervals>();
       AU.addPreserved<LiveIntervals>();
+      AU.addPreservedID(MachineDominatorsID);
       AU.addRequired<SlotIndexes>();
       AU.addPreserved<SlotIndexes>();
       MachineFunctionPass::getAnalysisUsage(AU);
```
Second, over a hundred of them fail with various MachineVerifier errors. This is a real problem that needs to be fixed (or else this pass should stop claiming that it preserves LiveIntervals).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVVFvozgQ_jXkZRQEJhDywEOabE-R9qTo2u49G3sI7jqYs03a_PsbE9omtz1pby-yAsYzn7-Z8XyujTxXD4jQet-7KFtH7J6GxZPCFxdrfTrGxh7o0zZly2WWwp-7PZlBlN_9zkWrOvyGVjUKbZRv4dGeo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