<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 - Severe optimizer regression with LLVM 11.0.0-rc2"
   href="https://bugs.llvm.org/show_bug.cgi?id=47322">47322</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Severe optimizer regression with LLVM 11.0.0-rc2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </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>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Interprocedural Optimizations
          </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>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23896" name="attach_23896" title="unoptimized input IR">attachment 23896</a> <a href="attachment.cgi?id=23896&action=edit" title="unoptimized input IR">[details]</a></span>
unoptimized input IR

Hi, not sure whether I've chosen the right bug component, but anyway: I've hit
an apparent severe regression while testing LLVM 11-rc2 with LDC, on both Linux
and macOS x86_64. I've attached the unoptimized .ll produced by LDC.

With LLVM 10, `opt -O3 -mtriple=x86_64-linux-gnu` yields the expected:
---
define i32 @main() local_unnamed_addr #0 {
forbody.preheader.i:
  ret i32 0
}
---

while LLVM 11-rc2 comes up with an *undefined* branch:
---
define i32 @main() local_unnamed_addr #0 {
forbody.i:
  br i1 undef, label %assertPassed, label %forbody.i.2

assertPassed:                                     ; preds = %forbody.i
  ret i32 0

forbody.i.2:                                      ; preds = %forbody.i
  tail call void @__assert(i8* getelementptr inbounds ([55 x i8], [55 x i8]*
@.str.4, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]*
@.str.5, i64 0, i64 0), i32 2432) #2
  unreachable
}
---</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>