GHCi unboxed tuples register saving incompatible with LLVM
Unfortunately this wasn't picked up by CI. The stg_ctoi_t
and stg_ret_t
closures save and restore a tuple from registers, respectively. They use a tuple_info
word that describes which registers are live. Overlapping registers are never live at the same time, but the LLVM code generator doesn't know this, resulting in errors like this:
ghc-stage1: sorry! (unimplemented feature or known bug)
(GHC version 9.1.20210325:
LLVM code generator
Found two different Cmm registers (F1,D1) both alive AND mapped to the same real register: %r17. This isn't currently supported by the LLVM backend.
We probably need to change the Cmm register saving strategy a little bit.