Mips: Mark special case calling convention handling as custom
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 8 Jul 2021 23:35:45 +0000 (19:35 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 13 Jul 2021 15:04:10 +0000 (11:04 -0400)
commit6a3904f16e8e2095082f71e862a33266e10fa871
treeaee2babda641cb22c52782260a2b7c27001095ad
parent0da95a5cf2691c8e01ae02f108487c397ab7e0ce
Mips: Mark special case calling convention handling as custom

The number of registers used for passing f64 in some cases is context
dependent, and thus getNumRegistersForCallingConv is sometimes
inaccurate. For f64, it reports 1 but is sometimes split into 2 32-bit
registers.

For GlobalISel, the generic argument assignment code expects
getNumRegistersForCallingConv to return an accurate answer. Switch to
marking these arguments as custom so we can deal with this case as a
custom assignment rather.

This temporarily breaks a few globalisel tests which are fixed by a
future change to use more of the generic infrastructure.
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/test/CodeGen/Mips/GlobalISel/irtranslator/float_args.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/float_args.ll