Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[Sparc] Get sret arg size from CallLoweringInfo.getArgs()

Authored by dcederman on Jun 13 2018, 1:20 AM.



Looking at the callee argument list, as is done now, might not work if the function has been typecasted into one that is expected to return a struct. This change also simplifies the code.

The isFP128ABICall() function can be removed as it is no longer needed. The test in fp128.ll has been updated to verify this.

Diff Detail


Event Timeline

dcederman created this revision.Jun 13 2018, 1:20 AM

Nice simplification.

828 ↗(On Diff #151110)

Please change this to cast instead of dyn_cast, since we can't handle a NULL return value anyhow.

I suspect this probably should be getArgs()[Outs[realArgIdx].OrigArgIndex] instead of [i]?

dcederman updated this revision to Diff 160339.Aug 13 2018, 6:13 AM

Changed dyn_cast to cast. SRet is only allowed on the first argument, checked by LowerFormalArguments_32 at line 406, so I replaced [i] with [0].

jyknight accepted this revision.Aug 16 2018, 8:32 AM
This revision is now accepted and ready to land.Aug 16 2018, 8:32 AM
This revision was automatically updated to reflect the committed changes.