In working on the in-memory sret tail-calling problem, I ran into this. As I want to adjust this code for sret, I figured it best to get this change in first. It turns out that there are no paths into LowerFormalParms that have already specified the sret register. We always materialize a virtual and then assign it to the physical reg at the point of the return. Thus the 'if (!reg)' body is always reachable. Tested by (a) grepping for setSRetReturnReg calls (there are no others), and (b) building and testing with this assert added.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Herald added subscribers: pengfei, hiraditya, kristof.beyls. · View Herald TranscriptAug 26 2021, 6:09 AM
This revision is now accepted and ready to land.Aug 26 2021, 11:41 AM
Closed by commit rG199ac3a839d9: [NFC][X86] Sret return register cleanup (authored by urnathan). · Explain WhyAug 27 2021, 4:04 AM
This revision was automatically updated to reflect the committed changes.