[all-commits] [llvm/llvm-project] f3139b: [GlobalISel] Fix wrong invocation of `getParamStac...

Momchil Velikov via All-commits all-commits at lists.llvm.org
Mon May 10 04:17:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3139b20a0bf56b3a5e20542363a799619b98ec9
      https://github.com/llvm/llvm-project/commit/f3139b20a0bf56b3a5e20542363a799619b98ec9
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list