<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 - Huge codegen performance regression for Windows targets since LLVM 12, incl. latest 13-rc2"
   href="https://bugs.llvm.org/show_bug.cgi?id=51827">51827</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Huge codegen performance regression for Windows targets since LLVM 12, incl. latest 13-rc2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </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>kinke@gmx.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25252" name="attach_25252" title="xz-compressed bitcode input file">attachment 25252</a> <a href="attachment.cgi?id=25252&action=edit" title="xz-compressed bitcode input file">[details]</a></span>
xz-compressed bitcode input file

I'm seeing a codegen slowdown by about 2 orders of magnitude for the attached
.bc file (generated by LDC, the LLVM D compiler) starting with LLVM 12.0.0.
Seems to be specific to Windows/MSVC targets, and timings are back to normal
when enabling the optimizer.

Using clang from the official LLVM Windows builds from GitHub and compiling via
`clang -c template9.bc`:
* v11.0.1: ~2.4 seconds
* v12.0.1: ~246 seconds
* v13.0.0-rc2: ~227 seconds

Enabling the optimizer by adding `-O3` hints at a further little regression in
v13:
* v11.0.1: ~3.3 seconds
* v12.0.1: ~3.3 seconds
* v13.0.0-rc2: ~5.0 seconds</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>