<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79822>79822</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AArch64] Using inout h0 with i16 in inline asm asserts with GlobalISel
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:AArch64
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nikic
</td>
</tr>
</table>
<pre>
```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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8tuwzYQ_JrVhbBBrWzLOugg21FjoGiKtEHRIyWtJdY0KfCRx98XpJwmBQIQNrmPIWdnJJyToyaqYXuA7SkTwU_G1lpeZZ91ZvioYceXpdTrDfgJeOOFHckzb-WsiEFxYoAohO2n3WYV9FWbN71SUof31agDIC5ty-9AF6mJyXzHYMM9OQ-4TyfcvgNWDMrDUhkjlny6oBdKpR7hbvG2tI5pV5wAd1AeJg7lCfDIU-475B2ORbB72JK_P6o83TefPJfjc9Ba6pH5STrmJ2vCOLE0hZ6tnmJdxHNBecekhqL5EeWRp9cfn37_m_21X2JBy9us6Eba08AsjStvVpZG1pv5Yyl5-e35oTk-NodfHxi9Ux9ipfAMsJ3MjQBbPZvZvAK2lmbjANuozmq25h_q_f0Y_2QH2P6Z9AJsmyZp9LU7a-ftWV_Mup9nKJpNWVSA-Y9czp69GXt1bNHvEqdxn4R0TBvPgqNhnQ11MVRFJTKq85LvtkVR7TGb6l3e9xfclJhfhgH5nvIiL_pq2-WF2PNim8kaOW54jlXMcFx3ZSm6vOuI-jwXxGHD6SakWkd2a2PHTDoXqC6rPWKmREfKJSMjdqK_kh6gaP7jjNHftk6D6sLoYMOVdN59oXnpVfoSPnu2J_biogukNsGzibM36afkIamZ1CpOIjpSOEfWuyX9izKdUOc_SGXBqnryfnbRINgCtqP0U-jWvbl9U-n_2iVSUdPE698AAAD__31-EmQ">