[all-commits] [llvm/llvm-project] 0e4378: [LoongArch] Add emergency spill slot for CFR spill...

wanglei via All-commits all-commits at lists.llvm.org
Fri Nov 18 22:53:43 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e4378c55e318869ea6404f2351f143e6d17fbfe
      https://github.com/llvm/llvm-project/commit/0e4378c55e318869ea6404f2351f143e6d17fbfe
  Author: wanglei <wanglei at loongson.cn>
  Date:   2022-11-19 (Sat, 19 Nov 2022)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
    A llvm/test/CodeGen/LoongArch/mafft-Lalignmm.ll

  Log Message:
  -----------
  [LoongArch] Add emergency spill slot for CFR spill/reload

When all registers have been allocated and CFR needs to be saved on the
stack, an emergency spill slot is required. Because CFR's spill and
reload require a general purpose register to transfer.

The attached test case was bugpoint-reduced down from
`MultiSource/Benchmarks/mafft/Lalignmm.c` in the test-suite.
Without this patch, llc will crash and report the following errors:

```
LLVM ERROR: Error while trying to spill R4 from class GPR: Cannot scavenge register without an emergency spill slot!
```

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D138007




More information about the All-commits mailing list