summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-04-22 14:54:39 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-04-22 14:54:39 +0000
commit70346d127be6e9d9098552f61c1a8b7756ac4a28 (patch)
tree5dbf8c8bf96ac10b808c9fecf2cae7fad0957a8c /llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
parent81ffc08a8ad589a3a8c52ebf1b4a92187fb056e4 (diff)
downloadbcm5719-llvm-70346d127be6e9d9098552f61c1a8b7756ac4a28.tar.gz
bcm5719-llvm-70346d127be6e9d9098552f61c1a8b7756ac4a28.zip
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
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
index 7e843e83780..c8a146741ec 100644
--- a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
+++ b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
@@ -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,
OpenPOWER on IntegriCloud