[PATCH] D76380: [PowerPC][AIX] Implement by-val caller arguments in multiple registers
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 11:49:16 PDT 2020
sfertile added a comment.
I suggest adding a test along the lines of:
struct F {
float x, y, z;
};
int callee(struct F);
int caller(void) {
struct F s = { 0.0f, 0.0f, 0.0f };
return callee(s);
}
1. To show that homogeneous float aggregates are still passed in gprs.
2. So that not all the tests load a global value for the argument.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7250
+ // Initialize registers, which are fully occupied by the by-val argument.
+ while (I != E && ArgLocs[I].getValNo() == ValNo &&
+ LoadOffset + PtrByteSize <= ByValSize) {
----------------
Are 'I != E' and `ArgLocs[I].getValNo() == ValNo` not both implied by `LoadOffset + PtrByteSize <= ByValSize`? They are probably better as assertions inside the loop body.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76380/new/
https://reviews.llvm.org/D76380
More information about the llvm-commits
mailing list