[llvm] e2a2df2 - [AMDGPU] Add test for set_gpr_idx removal with conditional branches
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 30 07:08:00 PDT 2021
Author: Jay Foad
Date: 2021-04-30T15:01:32+01:00
New Revision: e2a2df2a1e96a523dd7c0f8fb1eb5935aa6b4d09
URL: https://github.com/llvm/llvm-project/commit/e2a2df2a1e96a523dd7c0f8fb1eb5935aa6b4d09
DIFF: https://github.com/llvm/llvm-project/commit/e2a2df2a1e96a523dd7c0f8fb1eb5935aa6b4d09.diff
LOG: [AMDGPU] Add test for set_gpr_idx removal with conditional branches
Added:
Modified:
llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir b/llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir
index 6ba12e569d0d..12490f50f018 100644
--- a/llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir
+++ b/llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir
@@ -474,3 +474,54 @@ body: |
S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
}
...
+
+# FIXME: remove S_SET_GPR_IDX_* despite the branch at the end of the block
+---
+name: simple_cbranch_vccz
+body: |
+ ; GCN-LABEL: name: simple_cbranch_vccz
+ ; GCN: bb.0:
+ ; GCN: successors: %bb.1(0x80000000)
+ ; GCN: S_SET_GPR_IDX_ON $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ ; GCN: $vgpr16 = V_MOV_B32_e32 undef $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ ; GCN: S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ ; GCN: S_SET_GPR_IDX_ON killed $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ ; GCN: $vgpr15 = V_MOV_B32_e32 undef $vgpr0, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ ; GCN: S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ ; GCN: S_CBRANCH_VCCZ %bb.1, implicit $vcc
+ ; GCN: bb.1:
+ bb.0:
+ S_SET_GPR_IDX_ON $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ $vgpr16 = V_MOV_B32_e32 undef $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ S_SET_GPR_IDX_ON killed $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ $vgpr15 = V_MOV_B32_e32 undef $vgpr0, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ S_CBRANCH_VCCZ %bb.1, implicit $vcc
+ bb.1:
+...
+
+# FIXME: remove S_SET_GPR_IDX_* despite the branch at the end of the block
+---
+name: simple_cbranch_execz
+body: |
+ ; GCN-LABEL: name: simple_cbranch_execz
+ ; GCN: bb.0:
+ ; GCN: successors:
+ ; GCN: S_SET_GPR_IDX_ON $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ ; GCN: $vgpr16 = V_MOV_B32_e32 undef $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ ; GCN: S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ ; GCN: S_SET_GPR_IDX_ON killed $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ ; GCN: $vgpr15 = V_MOV_B32_e32 undef $vgpr0, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ ; GCN: S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ ; GCN: bb.1:
+ bb.0:
+ S_SET_GPR_IDX_ON $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ $vgpr16 = V_MOV_B32_e32 undef $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ S_SET_GPR_IDX_ON killed $sgpr2, 1, implicit-def $mode, implicit-def $m0, implicit $mode, implicit undef $m0
+ $vgpr15 = V_MOV_B32_e32 undef $vgpr0, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, implicit $m0
+ S_SET_GPR_IDX_OFF implicit-def $mode, implicit $mode
+ S_CBRANCH_EXECZ %bb.1, implicit $exec
+ bb.1:
+...
More information about the llvm-commits
mailing list