AMDGPU: Scalarize vector argument types to calls
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jul 2018 19:05:14 +0000 (19:05 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jul 2018 19:05:14 +0000 (19:05 +0000)
commit9ced1e0d80d432034221c3ff36fdf01a8bcf1aca
tree9a3b0fce654b4dfc0ea1272e053e0c8debdc3a0a
parente8c70bc187845a7ee065e133a78eaad159b73ad7
AMDGPU: Scalarize vector argument types to calls

When lowering calling conventions, prefer to decompose vectors
into the constitute register types. This avoids artifical constraints
to satisfy a wide super-register.

This improves code quality because now optimizations don't need to
deal with the super-register constraint. For example the immediate
folding code doesn't deal with 4 component reg_sequences, so by
breaking the register down earlier the existing immediate folding
code is able to work.

This also avoids the need for the shader input processing code
to manually split vector types.

llvm-svn: 338416
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/bfi_int.ll
llvm/test/CodeGen/AMDGPU/call-argument-types.ll
llvm/test/CodeGen/AMDGPU/mad-mix.ll