llvm-project/llvm/test/CodeGen/Mips/cconv
Simon Dardis 212cccb2f4 Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns"
By target hookifying getRegisterType, getNumRegisters, getVectorBreakdown,
backends can request that LLVM to scalarize vector types for calls
and returns.

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 LLVM-IR with vector types in calls and returns. E.g.
'call @foo(<4 x i32> %4)'.

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
integer register.

By teaching the MIPS backend to inspect the original types, it can now
implement the MIPS vector ABI which requires a particular method of
scalarizing vectors.

Previously, the MIPS backend relied on clang to scalarize types such as "call
@foo(<4 x float> %a) into "call @foo(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.

The previous version of this patch had a "conditional move or jump depends on
uninitialized value".

Reviewers: zoran.jovanovic, jaydeep, vkalintiris, slthakur

Differential Revision: https://reviews.llvm.org/D27845

llvm-svn: 305083
2017-06-09 14:37:08 +00:00
..
arguments-float.ll In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00
arguments-fp128.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-hard-float-varargs.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-hard-float.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-hard-fp128.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-small-structures-bigger-than-32bits.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
arguments-struct.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-varargs-small-structs-byte.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-varargs-small-structs-combinations.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
arguments-varargs-small-structs-multiple-args.ll
arguments-varargs.ll In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00
arguments.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
callee-saved-float.ll [mips][microMIPS] Implement LDC1, SDC1, LDC2, SDC2, LWC1, SWC1, LWC2 and SWC2 instructions and add CodeGen support 2016-07-11 07:41:56 +00:00
callee-saved-fpxx.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
callee-saved-fpxx1.ll
callee-saved.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
memory-layout.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
reserved-space.ll [mips] Enable tail calls by default 2016-08-04 09:17:07 +00:00
return-float.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
return-hard-float.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
return-hard-fp128.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
return-hard-struct-f128.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
return-struct.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
return.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
roundl-call.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
stack-alignment.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
vector.ll Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00