[AMDGPU] Fix SGPR fixing through SCC chaining
authorMichael Liao <michael.hliao@gmail.com>
Fri, 15 Mar 2019 12:42:21 +0000 (12:42 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Fri, 15 Mar 2019 12:42:21 +0000 (12:42 +0000)
commit6883d7e192fc81ba0ca1b9b4e55d54836b2712a4
treee70f6237c39d728b2f416b5359f1cfc897f12b10
parent728293ac874060da995c5c049e9312bc70a5256c
[AMDGPU] Fix SGPR fixing through SCC chaining

Summary:
- During the fixing of SGPR copying from VGPR, ensure users of SCC is
  properly propagated, i.e.
  * only propagate through live def of SCC,
  * skip the SCC-def inst itself, and
  * stop the propagation on the other SCC-def inst after checking its
    SCC-use first.

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59362

llvm-svn: 356258
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/test/CodeGen/AMDGPU/fix-sgpr-copies.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/udivrem64.ll