AMDGPU: Erase redundant redefs of m0 in SIFoldOperands
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 21 Oct 2019 19:53:46 +0000 (19:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 21 Oct 2019 19:53:46 +0000 (19:53 +0000)
commit8ebbf25cb1e9b2c95903917b2aa72363e5b20a42
tree4dc9e4bdb62bae95104c8558aab037f035edc2ee
parentdd6cf159bab7cfa5dd61670d5048dab48c934eba
AMDGPU: Erase redundant redefs of m0 in SIFoldOperands

Only handle simple inter-block redefs of m0 to the same value. This
avoids interference from redefs of m0 in SILoadStoreOptimzer. I was
initially teaching that pass to ignore redefs of m0, but having them
not exist beforehand is much simpler.

This is in preparation for deleting the current special m0 handling in
SIFixSGPRCopies to allow the register coalescer to handle the
difficult cases.

llvm-svn: 375449
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
llvm/test/CodeGen/AMDGPU/fold-operands-remove-m0-redef.mir [new file with mode: 0644]