[llvm] [NVPTX][NFC] Use same logic to get alignment in param declarations and function prototypes (PR #98220)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 16:41:25 PDT 2024
================
@@ -1438,10 +1438,8 @@ std::string NVPTXTargetLowering::getPrototype(
if (!Outs[OIdx].Flags.isByVal()) {
if (IsTypePassedAsArray(Ty)) {
- const CallInst *CallI = cast<CallInst>(&CB);
Align ParamAlign =
- getAlign(*CallI, i + AttributeList::FirstArgIndex)
- .value_or(getFunctionParamOptimizedAlign(F, Ty, DL));
+ getArgumentAlignment(&CB, Ty, i + AttributeList::FirstArgIndex, DL);
----------------
Artem-B wrote:
Ah, I see. LGTM.
https://github.com/llvm/llvm-project/pull/98220
More information about the llvm-commits
mailing list