<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 - Crash in 'Machine Common Subexpression Elimination' and possibly other passes"
   href="https://bugs.llvm.org/show_bug.cgi?id=35392">35392</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in 'Machine Common Subexpression Elimination' and possibly other passes
          </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>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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rtrieu@google.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=19458" name="attach_19458" title="Example code">attachment 19458</a> <a href="attachment.cgi?id=19458&action=edit" title="Example code">[details]</a></span>
Example code

Stack dump:
0.      Program arguments: clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -target-cpu x86-64 -O1 -std=c++11 -fsanitize=address -x c++ test.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test.cpp'.
4.      Running pass 'Machine Common Subexpression Elimination' on function
'@_ZNK1S3RunER1RR4Pair'
Segmentation fault (core dumped)

clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -target-cpu x86-64 -O1
-std=c++11 -fsanitize=address -x c++ test.cpp

The attached file uses macros to generate many repetitive branches in the
function.  Once preprocessed, the code is over four thousands lines.  Compiling
can take a few minutes.  MachineCSE was not the only pass seen while reducing
this example.  These are all the passes seen in crash logs:

'Machine Common Subexpression Elimination'
'X86 DAG->DAG Instruction Selection'
'Live Variable Analysis'
'X86 Optimize Call Frame'</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>