HomePhabricator

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

Authored by chill on May 10 2021, 3:19 AM.

Description

[GlobalISel] Fix wrong invocation of getParamStackAlign (NFC)

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.

Differential Revision: https://reviews.llvm.org/D102004

Details