[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
Loading
Please sign in to comment