qbe built from commit 04b2967 with the arm64 target selected exhibits an assertion failure "temporary has mapping" during the register allocation stage when passed this input: https://paste.sr.ht/~handlerug/f9e0f7bec5350b814bcf5123470cca6aed73ef02 The assertion is at rega.c:92. Reproduced on Alpine Linux edge, IR generated by the harec (compiler for the Hare programming language) commit 8a0b4ff from this code: https://paste.sr.ht/~handlerug/4b3e28b1a895a45dd808e5540920a410adc56d26
Hi Umar, Thank you for the report. As of commit 87dc3ea290a4ba75f153c5bb8b9fb87ec548e64f qbe should compile this example correctly. The bug was triggered because the example generated IL with a very large number of temporaries live at some block boundaries. It was a defect of the copy elimination pass that so many temps were live, and I fixed it (at least for this example) in commit 0db06dad63e02b619671bfb3dd25fc92c0856319. Thanks for reporting the bug.