diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-09-08 18:51:26 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-09-08 18:51:26 +0000 |
commit | 2f4df7ec414baf9d312ec9e207a7f89b47ace007 (patch) | |
tree | 0451d3562ae9217af24c7f077e39795f59f656d3 /llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp | |
parent | 747b0e2905dc8a2b25d5ae97f5008efcd831795b (diff) | |
download | bcm5719-llvm-2f4df7ec414baf9d312ec9e207a7f89b47ace007.tar.gz bcm5719-llvm-2f4df7ec414baf9d312ec9e207a7f89b47ace007.zip |
AMDGPU: Recompute scc liveness
The various scalar bit operations set SCC,
so one is erased or moved it needs to be recomputed.
Not sure why the existing tests don't fail on this.
llvm-svn: 312819
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp index 19a437f10f1..6b2668fe052 100644 --- a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp +++ b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp @@ -142,9 +142,10 @@ bool SIOptimizeExecMaskingPreRA::runOnMachineFunction(MachineFunction &MF) { DEBUG(dbgs() << "Removing no effect instruction: " << *I << '\n'); - for (auto &Op : I->operands()) + for (auto &Op : I->operands()) { if (Op.isReg()) RecalcRegs.insert(Op.getReg()); + } auto Next = std::next(I); LIS->RemoveMachineInstrFromMaps(*I); @@ -193,6 +194,11 @@ bool SIOptimizeExecMaskingPreRA::runOnMachineFunction(MachineFunction &MF) { auto SaveExec = getOrExecSource(*Lead, *TII, MRI); unsigned SaveExecReg = getOrNonExecReg(*Lead, *TII); + for (auto &Op : Lead->operands()) { + if (Op.isReg()) + RecalcRegs.insert(Op.getReg()); + } + LIS->RemoveMachineInstrFromMaps(*Lead); Lead->eraseFromParent(); if (SaveExecReg) { |