AMDGPU/GlobalISel: Manually select G_BUILD_VECTOR_TRUNC
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 15 Feb 2020 22:14:17 +0000 (17:14 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Fri, 21 Feb 2020 15:34:11 +0000 (10:34 -0500)
commitac7abe0ba9ae4c6a2248cc3ef4e4fe7e6d270105
treee1b183f5d369e6a46e3c81347de2900cd7145ba2
parent79ff188addeeea127c7a7edd808c5821917d4bb6
AMDGPU/GlobalISel: Manually select G_BUILD_VECTOR_TRUNC

We have patterns for s_pack* selection, but they assume the inputs are
a build_vector with 16-bit inputs, not a truncating build
vector. Since there's still outstanding work for how to handle
mismatched result and source element vector operations, and since I'm
trying a different packed vector strategy than SelectionDAG, just
manually select this for now.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-build-vector-trunc.v2s16.mir