[PATCH] D99087: [RISCV] Fix stack slot for argument types (Bug 49500)
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 13 03:32:56 PDT 2021
luismarques added a comment.
In D99087#2685264 <https://reviews.llvm.org/D99087#2685264>, @frasercrmck wrote:
> No worries. I just noticed my latest "pref" diff mistakenly changed the initial `StackAlign` from `max(align(ArgValueVT), align(Outs[i].ArgVT))` to `max(prefalign(ArgValueVT), prefalign(ArgValueVT))`. I now think that this is where the diffs came from. The align of the `Outs[i].ArgVT` type is often likely larger than the split type (like `i128` vs. `XLEN`), so by removing it we reduce the stack size.
>
> Right now I suspect I should revert this back to the preferred alignment of `Outs[i].ArgVT` so we're at least keeping the same alignment (or safely increasing it to the split type). Any thoughts?
Ahh, that explains it. Yes, I think we need that change (that you already made).
> I don't know if we strictly need the alignment of the original type or not.
I think we do, per the psABI alignment requirements.
I'll go over the patch more thoroughly later, but this now seems more like what I would expect and could probably be committed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99087/new/
https://reviews.llvm.org/D99087
More information about the llvm-commits
mailing list