[X86][Inline] Skip inline asm in inlining target feature check (#83820)
authorNikita Popov <npopov@redhat.com>
Tue, 5 Mar 2024 13:21:33 +0000 (14:21 +0100)
committerTom Stellard <tstellar@redhat.com>
Wed, 13 Mar 2024 23:20:21 +0000 (16:20 -0700)
commit8c6015db5912dee1cce0e900b6abe5735be09b83
treeb79019be0a4738e91e8475b2f9ec8644bddd9b90
parent38cf35dee880e9e8545e7c2997201ae28f3a6738
[X86][Inline] Skip inline asm in inlining target feature check (#83820)

When inlining across functions with different target features, we
perform roughly two checks:
 1. The caller features must be a superset of the callee features.
2. Calls in the callee cannot use types where the target features would
change the call ABI (e.g. by changing whether something is passed in a
zmm or two ymm registers). The latter check is very crude right now.

The latter check currently also catches inline asm "calls". I believe
that inline asm should be excluded from this check, as it is independent
from the usual call ABI, and instead governed by the inline asm
constraint string.

Fixes https://github.com/llvm/llvm-project/issues/67054.

(cherry picked from commit e84182af919d136d74b75ded4d599b38fb47dfb0)
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/test/Transforms/Inline/X86/call-abi-compatibility.ll