[llvm-bugs] [Bug 46812] New: WebAssembly: non-simd128 functions aren't inlined into simd128 functions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 22 13:54:04 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46812

            Bug ID: 46812
           Summary: WebAssembly: non-simd128 functions aren't inlined into
                    simd128 functions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org, tlively at google.com

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200722/aaf1bfb3/attachment.html>


More information about the llvm-bugs mailing list