aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2020-02-05 12:52:02 -0800
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2020-03-31 11:49:06 -0700
commit08682dcc8631bcbfd68834a7dc352499a0a06af0 (patch)
treecb40b1877f452e87edadad2121be516c2a827635 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent28518d9ae39ff5c6044e230d58b6ae28b0252cae (diff)
downloadllvm-08682dcc8631bcbfd68834a7dc352499a0a06af0.zip
llvm-08682dcc8631bcbfd68834a7dc352499a0a06af0.tar.gz
llvm-08682dcc8631bcbfd68834a7dc352499a0a06af0.tar.bz2
[AMDGPU] Define 16 bit VGPR subregs
We have loads preserving low and high 16 bits of their destinations. However, we always use a whole 32 bit register for these. The same happens with 16 bit stores, we have to use full 32 bit register so if high bits are clobbered the register needs to be copied. One example of such code is added to the load-hi16.ll. The proper solution to the problem is to define 16 bit subregs and use them in the operations which do not read another half of a VGPR or preserve it if the VGPR is written. This patch simply defines subregisters and register classes. At the moment there should be no difference in code generation. A lot more work is needed to actually use these new register classes. Therefore, there are no new tests at this time. Register weight calculation has changed with new subregs so appropriate changes were made to keep all calculations just as they are now, especially calculations of register pressure. Differential Revision: https://reviews.llvm.org/D74873
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions