[llvm] Reapply "[SystemZ] LivePhysRegs to LiveRegUnits (NFC) (#85162)" (PR #96842)

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 02:58:54 PDT 2024


JonPsson1 wrote:

I tried this and got a machine verifier error. With this change, the CC register is not added to the live in lists of the new MBBs. CC is the SystemZ flag register and is not allocatable, so it is not returned by getAllocatableSet().

I made reduced test case:

llc -mtriple=s390x-linux-gnu -mcpu=z16 -O3 tc_LiveRegUn.ll -o /dev/null -verify-machineinstrs

[tc.tar.gz](https://github.com/user-attachments/files/16360438/tc.tar.gz)

```
*** Bad machine code: Using an undefined physical register ***
- function:    BLI_strncpy_wchar_as_utf8
- basic block: %bb.6  (0xa05e560)
- instruction: renamable $r13h = SELFHR killed renamable $r13h, renamable $r0h, 14, 6, implicit $cc
- operand 5:   implicit $cc
...

```

https://github.com/llvm/llvm-project/pull/96842


More information about the llvm-commits mailing list