[PATCH] D27845: [SelectionDAG] Enable target specific vector scalarization of calls and returns
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 05:34:26 PST 2016
sdardis created this revision.
sdardis added reviewers: zoran.jovanovic, jaydeep.
sdardis added a subscriber: llvm-commits.
sdardis set the repository for this revision to rL LLVM.
Herald added a reviewer: vkalintiris.
By target hookifying getRegisterType, getNumRegisters, getVectorBreakdown,
backends can request that LLVM to scalarize vector types for calls
The MIPS vector ABI requires that vector arguments and returns are passed in
integer registers. With SelectionDAG's new hooks, the MIPS backend can now
handle raw LLVM-IR with vector types in calls and returns.
Previously these cases would be scalarized for the MIPS O32/N32/N64 ABI for
calls and returns if vector types were not legal. If vector types were legal,
a single 128bit vector argument would be assigned to a single 32 bit / 64 bit
By teaching the MIPS backend to inspect the original types, it can now
implement the MIPS vector ABI which requires a particular form scalarization
Previously, the MIPS backend relied on clang to scalarize types such as "call
(<4 x float> %a) into "call (i32 inreg %1, i32 inreg %2, i32 inreg %3,
i32 inreg %4)".
This patch enables the MIPS backend to take either form for vector types.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 97748 bytes
Desc: not available
More information about the llvm-commits