<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63632>63632</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
error: couldn't allocate input reg for constraint 'r' on MIPS when building some wasm2c-generated code
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
glandium
</td>
</tr>
</table>
<pre>
This is similar to #52638, but for floats.
Reduced C reproducer:
```
float a;
void foo() {
__asm__("" :: "r"(a));
}
```
```
$ clang --target=mips64el-linux-gnuabi64 -c test.c
test.c:3:13: error: couldn't allocate input reg for constraint 'r'
__asm__("" :: "r"(a));
^
1 error generated.
```
Reduced LLVM IR reproducer:
```
target triple = "mips64el-unknown-linux-gnuabi64"
define void @foo() {
call void asm sideeffect "", "r,~{$1}"(float 0.000000e+00)
ret void
}
```
```
$ llc test.ll
error: couldn't allocate input reg for constraint 'r'
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE1vtDYQ_jXmMgKZMQvLgcNmtytFSqQqrXpdGTOwbo29sk22vfS3V3wkfRXl8H6hkfGMmfE8zzNChqAHS9Sw3QPbnRI5xavzzWCk7fQ0Jq3r_ml-v-oAOkDQozbSQ3TAUOywFHuGR2inCL3z0BsnY8gYPzF-WNcX6iZFHRzB08272fFMbIes5Jst7pIOkomH1X91uoPeOYZ7hjWwaovD5SLDeLkscWSIMFcUB2CIfonsJcN6trdSrDp9euVHFwtQRtoB0jRKP1Bk4jTqWygLMqnRdvo7HewkW10WkCqIFGKm1txtLw6CiUM-L0DeuxktKDeZzjKsIkhjnJKRQNvbFMHTsFCnnA3RS20jMKw8w2rDCvAdcIHtfll3-doEDGTJy0hd9inwN5menv54hseXrxBrpQei1zdDwMRpbuedqsn-Zd3dfqBsbvaL2eio15ZgkZkV_DOlQUlj1i9kGCHojqjvSc0s4WLHjYbjv3MWFvks9ULKOk4848tDDB84n0naKnuKS-FvHhBjNuGNWYM_Qeb3a5KuEV0taplQk5f7fV7yuiqTa9NhrnjVSi5z1XLeikKoqi57km3JKReJbpCj4KXgmIsyL7MShdhTv6u5qkXOO1ZwGqU2mTGvY-b8kOgQJmpKUQpMjGzJhOUvgGjpDsvhzOTulPhmzknbaQis4EaHGP6vEnU01PwQCeAsPD_--hvcr2ShnbTptB0guJHgLsOIKn0fYFCuo2TyprnGeAvzfOKZ4XnQ8Tq1mXIjw_Pc3PZKb979SSoyPC-QAsPzAvm_AAAA__8huHCu">