<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 - X86: Crash in FEntryInserter pass when the first basic block is empty (Linux Kernel)"
   href="https://bugs.llvm.org/show_bug.cgi?id=33971">33971</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>X86: Crash in FEntryInserter pass when the first basic block is empty (Linux Kernel)
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>manojgupta@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>manojgupta@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>chandlerc@gmail.com, hfinkel@anl.gov, llozano@chromium.org, llvm-bugs@lists.llvm.org, niravd@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>FEntryInserter pass invoked with -mfentry option crashes if the first basic
block is empty.

Reduced test case:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: inlinehint minsize noredzone nounwind optsize sspstrong
define void @test() #0 {
entry:
  br label %bb1
bb1:
  call void @address_taken(i64 ptrtoint (i8* blockaddress(@test2, %bb1) to
i64), i32 512)
  ret void
}

; Function Attrs: minsize noredzone optsize
declare void @address_taken(i64, i32) local_unnamed_addr
attributes #0 = { inlinehint minsize noredzone nounwind optsize sspstrong
"fentry-call"="true" }</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>