[llvm] [X86][Inline] Skip inline asm in inlining target feature check (PR #83820)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 06:06:10 PST 2024


phoebewang wrote:

> > > > I think we can always drop the second check. I assume if a callee calls something unmatching its feature, e.g., 512-bit vector with AVX2. User would have got a warning about ABI change. Such user scenario is not ABI compatible already. We should not care it at all. Passing 512-bit vector with AVX512 feature is guaranteed not split in two ymm registers. We should not worry about it's changed by inlining.
> > > 
> > > 
> > > The problem is that this doesn't just happen in user-written code, but also as a result of argument promotion for example. We do want vector arguments to be promoted, but after this has happened, inlining may no longer be safe (even if vector types are never passed by value in the original code).
> > 
> > 
> > I think I have fixed the argument promotion issue by https://reviews.llvm.org/D123284 It is the only one that has the problem AFAIK.
> 
> I don't think it (fully) addresses the issue, at least because non-clang frontends do not use min-legal-vector-width.

The design of `min-legal-vector-width` is safe to non-clang frontends. Without the attribute, backend assume it's MAX_INT.

https://github.com/llvm/llvm-project/pull/83820


More information about the llvm-commits mailing list