[all-commits] [llvm/llvm-project] 876439: [X86][Inline] Make ABI compatibility check more pr...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 23 01:52:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 876439fa00d7e04201f08418297bcdbd85400bb8
      https://github.com/llvm/llvm-project/commit/876439fa00d7e04201f08418297bcdbd85400bb8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-06-23 (Tue, 23 Jun 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Transforms/Inline/X86/call-abi-compatibility.ll
    M llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll

  Log Message:
  -----------
  [X86][Inline] Make ABI compatibility check more precise (#205106)

When inlining a function that contains calls with vector arguments, we
have to be careful that inlining does not change the ABI of the call.
E.g. we generally can't inline a function without `+avx` into a
function with `+avx` if there are calls using vectors of size 256 or
larger, because they'd switch from passing in two xmm registers to
passing in a ymm register.

However, the current check is very crude and only allows inlining with
interior calls if the target features match *exactly* (via the base
areTypesABICompatible implementation). This is unnecessarily
conservative, as many target features do not affect the call ABI at all.

Make this check more precise by checking the result of
getRegisterTypeForCallingConv for the type between the TLI instances for
the caller and callee.



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