llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.62k stars 11.83k forks source link

[AArch64] Using inout h0 with i16 in inline asm asserts with GlobalISel #79822

Open nikic opened 8 months ago

nikic commented 8 months ago
target triple = "aarch64-unknown-linux-gnu"

define i16 @test(i16 %x) {
  %ret = call i16 asm "", "=&{h0},0"(i16 %x)
  ret i16 %ret
}

Running this through llc -O0 results in:

H0 = COPY W8
unimplemented reg-to-reg copy
UNREACHABLE executed at /home/npopov/repos/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:4739!

It works fine if -O0 is not used.

llvmbot commented 8 months ago

@llvm/issue-subscribers-backend-aarch64

Author: Nikita Popov (nikic)

```llvm target triple = "aarch64-unknown-linux-gnu" define i16 @test(i16 %x) { %ret = call i16 asm "", "=&{h0},0"(i16 %x) ret i16 %ret } ``` Running this through `llc -O0` results in: ``` H0 = COPY W8 unimplemented reg-to-reg copy UNREACHABLE executed at /home/npopov/repos/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:4739! ``` It works fine if `-O0` is not used.