aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2021-05-20 17:28:45 +0100
committerFraser Cormack <fraser@codeplay.com>2021-07-22 09:55:26 +0100
commitb115c038d2d4de15e240d15c6770df5c496b60b6 (patch)
tree960139deadc35524dd07fd3f9612bc6bc3285170 /llvm/lib/CodeGen/MachineInstr.cpp
parent7b3a69bc16515b0b28c520fba0fe0f51fcd3ea33 (diff)
downloadllvm-b115c038d2d4de15e240d15c6770df5c496b60b6.zip
llvm-b115c038d2d4de15e240d15c6770df5c496b60b6.tar.gz
llvm-b115c038d2d4de15e240d15c6770df5c496b60b6.tar.bz2
[RISCV] Fix a crash when lowering split float arguments
Lowering certain float vectors without legal vector types could cause a crash due to a bad interaction between passing floats via GPRs and argument splitting. Split vector floats appear just like scalar floats. Under certain situations we choose to pass these float arguments via GPRs and use an XLenVT location and set the 'BCvt' info to track how they must be converted back to floating-point values. However, later logic for handling split arguments may take over, in which case we lose the previous information and set the 'Indirect' info, thus incorrectly lowering to integer types. I don't believe that we would have come across the notion of split floating-point arguments before. This patch addresses the issue by updating the lowering so that split arguments are only passed indirectly when they are scalar integer types. This has some change to how we lower some larger illegal float vectors, as can be seen in 'fastcc-float.ll' where the vector is now passed partly in registers and partly on the stack. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D102852
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions