[llvm] r358890 - AMDGPU: Fix not checking for copy when looking at copy src
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 07:54:39 PDT 2019
Author: arsenm
Date: Mon Apr 22 07:54:39 2019
New Revision: 358890
URL: http://llvm.org/viewvc/llvm-project?rev=358890&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp?rev=358890&r1=358889&r2=358890&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp Mon Apr 22 07:54:39 2019
@@ -88,7 +88,12 @@ static bool isEndCF(const MachineInstr&
}
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,
More information about the llvm-commits
mailing list