[all-commits] [llvm/llvm-project] 37b8e7: [AlwaysInliner] Do not inline on attribute mismatches

Aiden Grossman via All-commits all-commits at lists.llvm.org
Tue Jul 14 06:15:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37b8e765ce4837a7577e6f762bcdffe4b232759c
      https://github.com/llvm/llvm-project/commit/37b8e765ce4837a7577e6f762bcdffe4b232759c
  Author: Aiden Grossman <aidengrossman at google.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/IPO/AlwaysInliner.cpp
    A llvm/test/Transforms/Inline/X86/always-inline-incompatible-target-features.ll
    M llvm/test/Transforms/Inline/always-inline-phase-ordering.ll

  Log Message:
  -----------
  [AlwaysInliner] Do not inline on attribute mismatches

7bdca287b102ee935e982613dba2264cbc7a32ad made it so that the inliner
will not inline functions with mismatched target attributes regardless
of the presence of alwaysinline. However, always-inline never actually
called into this function so would still do the illegal thing. I believe
the motivation for not putting it here originally/recently was that
clang does some rudimentary target feature checks, but we should not be
crashing on valid IR, and we do generate IR that caused crashes in ISel
due to this (e.g., ICP in ThinLTO backend actions).

Reviewers: nikic, aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/209345



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list