[PATCH] D34189: AMDGPU: Avoid saving/restoring reserved m0 register

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 18:49:00 PDT 2017


tstellar added a comment.

In https://reviews.llvm.org/D34189#779882, @MatzeB wrote:

> So you actually do you use the register before prolog/epilogue insertion? (Note that the register allocator will not use it at the moment as it is reserved, so it would need other AMDGPU code to explicitely use it).


Yes, the SelectionDAG emits instructions that have implicit defs of the register, see  SITargetLowering::copyToM0(), and several instructions have it defined as an implicit use.  Take a look at the ds_read2.ll test case for an example.


Repository:
  rL LLVM

https://reviews.llvm.org/D34189





More information about the llvm-commits mailing list