Xiangling_L added inline comments.
================ Comment at: clang/lib/CodeGen/TargetInfo.cpp:4317 + if (isAggregateTypeForABI(RetTy)) + return getNaturalAlignIndirect(RetTy); + ---------------- jasonliu wrote: > Xiangling_L wrote: > > This method uses the ABI alignment of the given aggregate type which I > > think is not ideal due to our AIX special alignment rule. We need to use > > preferred alignment in this case. > > Btw also I think it's not necessary for you to rebase your patch on the > > power alignment patch, I can refresh the testcase when I am dealing with > > that one. > As it is right now in master, there is no difference between natural > alignment and preferred alignment for AIX. The tentative direction is to use > preferred alignment to record the actual alignment on AIX, but it is not > finalized yet. I would rather leave this part of the work for the patch > that's going to implement the power alignment rule for AIX. `getNaturalAlignIndirect` uses ABI align which is for sure not correct on AIX target for Aggregate types. What we want is the actual alignment here. So I am not sure if we want to take `getNaturalAlignIndirect` for granted even if we know it's not correct semantically. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits