<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 - [MemorySSA][SimpleUnswitch] Assertion `dominates(MD, U) && "Memory Def does not dominate it's uses"' failed"
   href="https://bugs.llvm.org/show_bug.cgi?id=43641">43641</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MemorySSA][SimpleUnswitch] Assertion `dominates(MD, U) && "Memory Def does not dominate it's uses"' failed
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jji@us.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22651" name="attach_22651" title="Reduced IR file">attachment 22651</a> <a href="attachment.cgi?id=22651&action=edit" title="Reduced IR file">[details]</a></span>
Reduced IR file

$ cat t2.c
int a;
long b;
void c(d) {
  while (a) {
    e();
    if ((b < 0 || d && b) == 0)
      break;
  }
}

$clang -O3 -fexperimental-new-pass-manager -mllvm -enable-nontrivial-unswitch
-emit-llvm -S t2.c

opt: .../llvm-project/llvm/lib/Analysis/MemorySSA.cpp:2041: void
llvm::MemorySSA::verifyDomination(llvm::Function &) const: Assertion
`dominates(MD, U) && "Memory Def does not dominate it's uses"' failed.

---
Reduced IR attached.

opt -passes="default<O3>" -enable-nontrivial-unswitch -S reduced.ll</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>