<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 - Assertion `MA && "Handed an instruction that MemorySSA doesn't recognize?"' failed. with -instcombine -globals-aa -early-cse-memssa"
   href="https://bugs.llvm.org/show_bug.cgi?id=33756">33756</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `MA && "Handed an instruction that MemorySSA doesn't recognize?"' failed. with -instcombine -globals-aa -early-cse-memssa
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mikael.holmen@ericsson.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=18781" name="attach_18781" title="reproducer">attachment 18781</a> <a href="attachment.cgi?id=18781&action=edit" title="reproducer">[details]</a></span>
reproducer

opt -instcombine -globals-aa -early-cse-memssa -S -o - tr14022.ll

gives

opt: ../include/llvm/Transforms/Utils/MemorySSA.h:766: llvm::MemoryAccess*
llvm::MemorySSAWalker::getClobberingMemoryAccess(const llvm::Instruction*):
Assertion `MA && "Handed an instruction that MemorySSA doesn't recognize?"'
failed.

when running

[2017-07-12 10:51:50.717703492] 0x53b7e40     Executing Pass 'Early CSE w/
MemorySSA' on Function 'f3'...

The instruction that it crashes on is

(gdb) p I->dump()
  %call2 = call i16 @f1()

and MSSA looks like

(gdb) p MSSA
$3 = (llvm::MemorySSA *) 0x5e2f850
(gdb) p MSSA->dump()

define void @f3() {
  %call1 = call i16 @f1()
; 1 = MemoryDef(liveOnEntry)
  call void @f2()
  %call2 = call i16 @f1()
  ret void
}</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>