The implementation is inspired by code from PPCInstrInfo.
We look for a copy from X10(A0) preceded by an ADJCALLSTACKUP and
a PseudoCall. We use the PseudoCall to look up the IR function being
called to find it's return attributes.
Paths
| Differential D139808
[RISCV] Add support for call returns to RISCVSExtWRemoval. ClosedPublic Authored by craig.topper on Dec 11 2022, 10:12 PM.
Details Summary The implementation is inspired by code from PPCInstrInfo. We look for a copy from X10(A0) preceded by an ADJCALLSTACKUP and
Diff Detail
Event TimelineComment Actions Left a few comments based on an initial shallow review. Is it possible to test the zext case, or is it too fiddly to construct a reasonable test case?
This revision is now accepted and ready to land.Dec 13 2022, 7:01 AM This revision was landed with ongoing or failed builds.Dec 13 2022, 9:09 AM Closed by commit rG844430bcc377: [RISCV] Add support for call returns to RISCVSExtWRemoval. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 482513 llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
llvm/test/CodeGen/RISCV/sextw-removal.ll
|
I think the note in your commit message "We use the PseudoCall to look up the IR function being called to find it's return attributes." is helpful to comprehension.
How about "For a method return value, we check the ZExt/SExt attributes, using the PseudoCALL instruction to retrieve the IR function."?