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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 07:17:03 PST 2024


nikic wrote:

@phoebewang I just double checked to confirm that your patch does not address this issue. Here's a very simple example:
```
target triple = "x86_64-unknown-linux-gnu"

@g = external global i8
 
define void @test1(ptr %p) nounwind "target-features"="+avx" {
  call void @test2(ptr %p) 
  ret void
} 
 
define internal void @test2(ptr %p) {
  call void @test3(ptr %p)
  ret void
} 
 
define internal void @test3(ptr %p) nounwind noinline {
  %v = load <4 x i64>, ptr %p
  store <4 x i64> %v, ptr @g
  ret void 
}  
```
Note that this does not pass any vectors by value.

Now run `build/bin/opt -S -passes=argpromotion,inline | build/bin/llc` and you will get the argument passed in ymm0 in test1 and accepted in xmm0 and xmm1 in test3.

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


More information about the llvm-commits mailing list