AMDGPU: Fix not checking for copy when looking at copy src

Effectively reverts r356956. The check for isFullCopy was excessive,
but there still needs to be a check that this is a copy.

llvm-svn: 358890
This commit is contained in:
Matt Arsenault 2019-04-22 14:54:39 +00:00
parent 81ffc08a8a
commit 70346d127b
1 changed files with 6 additions and 1 deletions

View File

@ -88,7 +88,12 @@ static bool isEndCF(const MachineInstr& MI, const SIRegisterInfo* TRI) {
}
static bool isFullExecCopy(const MachineInstr& MI) {
return MI.getOperand(1).getReg() == AMDGPU::EXEC;
if (MI.isCopy() && MI.getOperand(1).getReg() == AMDGPU::EXEC) {
assert(MI.isFullCopy());
return true;
}
return false;
}
static unsigned getOrNonExecReg(const MachineInstr &MI,