<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 - WebAssembly: non-simd128 functions aren't inlined into simd128 functions"
   href="https://bugs.llvm.org/show_bug.cgi?id=46812">46812</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>WebAssembly: non-simd128 functions aren't inlined into simd128 functions
          </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>Windows NT
          </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>Interprocedural Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alex@crichton.co
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, tlively@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This issue was discovered when working with the simd128 feature of WebAssembly
and LLVM, but the following IR:



target triple = "wasm32-unknown-unknown"

define void @bar() #0 {
start:
  tail call fastcc void @inline_me()
  ret void
}

define internal void @inline_me() {
start:
  tail call void @foo()
  ret void
}

declare void @foo()

attributes #0 = { "target-features"="+simd128" }




when optimized with `opt -O2` won't actually inline the `inline_me` function.
This looks to be due to a conservative default of not inlining when target
features differ, but WebAssembly can probably inline regardless of target
features due to how the entire binary validates as a whole or doesn't.</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>