This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Fix wrong invocation of `getParamStackAlign` (NFC)
ClosedPublic

Authored by chill on May 6 2021, 10:04 AM.

Details

Summary

The function template CallLowering::setArgFlags is invoked both
for arguments and return values. In the latter case, it calls
getParamStackAlign with argument index ~0u. Nothing wrong
happens now, as the argument is safely incremented back to 0
inside getParamStackAlign (the type is unsigned), but in
principle it's fragile and may become incorrect.

Diff Detail

Event Timeline

chill created this revision.May 6 2021, 10:04 AM
chill requested review of this revision.May 6 2021, 10:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2021, 10:04 AM
arsenm accepted this revision.May 7 2021, 6:25 AM
This revision is now accepted and ready to land.May 7 2021, 6:25 AM