[PATCH] D137387: [LoongArch] Override TargetFrameLowering::spillCalleeSavedRegisters
wanglei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 23:19:38 PDT 2022
wangleiat created this revision.
wangleiat added reviewers: SixWeining, xen0n, xry111, gonglingqin, MaskRay.
Herald added subscribers: StephenFan, hiraditya, qcolombet.
Herald added a project: All.
wangleiat requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When using `llvm.returnaddress` intrinsic, special handling is required
for the spill of the `RA` register. Otherwise it will cause the verifier
fail in some cases (e.g. pr17377.c of the GCC C Torture Suite).
Specifically:
*** Bad machine code: Using an undefined physical register ***
- function: f
- basic block: %bb.0 entry (0xd94d18)
- instruction: ST_D killed $r1, $r22, -40 :: (store (s64) into %stack.2)
- operand 0: killed $r1
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137387
Files:
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
llvm/lib/Target/LoongArch/LoongArchFrameLowering.h
llvm/test/CodeGen/LoongArch/spill-ra-without-kill.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137387.473125.patch
Type: text/x-patch
Size: 5807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221104/981c1ee4/attachment.bin>
More information about the llvm-commits
mailing list