[PATCH] D71013: [AIX] Allow vararg calls when all arguments reside in registers.
Chris Bowler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 04:51:07 PST 2019
cebowleratibm marked 2 inline comments as done.
cebowleratibm added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6798
if (unsigned Reg = State.AllocateReg(FPR))
State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, MVT::f64, LocInfo));
else
----------------
ZarkoCA wrote:
> May be better to use the LocVT variable instead of hardcoding MVT::f64 so we know we the actual type. Meant to change this in my previous patch but it doesn't look like I kept it in the diff.
Ah yes, I had thought we should use f64 because the register is 64-bit but now understand that a reg holding f32 is understood to be a widened f32 value. I'll make this change.
================
Comment at: llvm/test/CodeGen/PowerPC/aix-cc-abi.ll:697
+ %1 = load double, double* @d1, align 8
+ call void (i32, ...) @test_vararg(i32 42, double %conv, i64 42, double %1)
+ ret void
----------------
ZarkoCA wrote:
> Can one of these be set as a float? This way it's explicitly shown that floats and doubles are handled differently.
We could, but there's no way to do so from C code. You can do so for typed functions, but then you don't initialize the GPR and this is outside the scope of this patch.
We could write such a test in IR with understanding nothing in C/C++ will produce such IR.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71013/new/
https://reviews.llvm.org/D71013
More information about the llvm-commits
mailing list