[PATCH] D77992: [AMDGPU] Don't assert on partial exec copy
Austin Kerbow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 12 21:23:19 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeab9a4f1192a: [AMDGPU] Don't assert on partial exec copy (authored by kerbowa).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77992/new/
https://reviews.llvm.org/D77992
Files:
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
llvm/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
Index: llvm/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
===================================================================
--- llvm/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
+++ llvm/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
@@ -117,3 +117,25 @@
bb.1:
...
+
+# Don't crash on exec copy to SGPR subregister.
+---
+name: exec_copy_to_subreg
+tracksRegLiveness: true
+body: |
+ ; GCN-LABEL: name: exec_copy_to_subreg
+ ; GCN: bb.0:
+ ; GCN: successors: %bb.1(0x80000000)
+ ; GCN: dead undef %0.sub0:sreg_256 = COPY $exec
+ ; GCN: dead %1:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, undef %2:sreg_64_xexec, implicit $exec
+ ; GCN: S_BRANCH %bb.1
+ ; GCN: bb.1:
+ bb.0:
+
+ undef %0.sub0:sreg_256 = COPY $exec
+ %2:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, undef %1:sreg_64_xexec, implicit $exec
+ S_BRANCH %bb.1
+
+ bb.1:
+
+...
Index: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
+++ llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
@@ -71,10 +71,8 @@
static bool isFullExecCopy(const MachineInstr& MI, const GCNSubtarget& ST) {
unsigned Exec = ST.isWave32() ? AMDGPU::EXEC_LO : AMDGPU::EXEC;
- if (MI.isCopy() && MI.getOperand(1).getReg() == Exec) {
- assert(MI.isFullCopy());
+ if (MI.isFullCopy() && MI.getOperand(1).getReg() == Exec)
return true;
- }
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77992.256916.patch
Type: text/x-patch
Size: 1501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200413/49a430a0/attachment.bin>
More information about the llvm-commits
mailing list