diff options
| author | Geoff Berry <gberry@codeaurora.org> | 2017-12-12 17:53:59 +0000 |
|---|---|---|
| committer | Geoff Berry <gberry@codeaurora.org> | 2017-12-12 17:53:59 +0000 |
| commit | 60c431022ec7f4d287302691a1ef5706315f7aac (patch) | |
| tree | 0cb7d0621c8426dc443e67afc9073eca6317e7d1 /llvm/test/CodeGen/AMDGPU | |
| parent | 10bcc1cf90de105d0511f3d5616ceaa3195c6f36 (diff) | |
| download | bcm5719-llvm-60c431022ec7f4d287302691a1ef5706315f7aac.tar.gz bcm5719-llvm-60c431022ec7f4d287302691a1ef5706315f7aac.zip | |
[MachineOperand][MIR] Add isRenamable to MachineOperand.
Summary:
Add isRenamable() predicate to MachineOperand. This predicate can be
used by machine passes after register allocation to determine whether it
is safe to rename a given register operand. Register operands that
aren't marked as renamable may be required to be assigned their current
register to satisfy constraints that are not captured by the machine
IR (e.g. ABI or ISA constraints).
Reviewers: qcolombet, MatzeB, hfinkel
Subscribers: nemanjai, mcrosier, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D39400
llvm-svn: 320503
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/shrink-carry.mir | 8 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/splitkit.mir | 16 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/subreg_interference.mir | 12 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/syncscopes.ll | 6 |
5 files changed, 23 insertions, 23 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/shrink-carry.mir b/llvm/test/CodeGen/AMDGPU/shrink-carry.mir index cf000ffa774..d499b2192e9 100644 --- a/llvm/test/CodeGen/AMDGPU/shrink-carry.mir +++ b/llvm/test/CodeGen/AMDGPU/shrink-carry.mir @@ -1,7 +1,7 @@ # RUN: llc -march=amdgcn -verify-machineinstrs -start-before si-shrink-instructions -stop-before si-insert-skips -o - %s | FileCheck -check-prefix=GCN %s # GCN-LABEL: name: subbrev{{$}} -# GCN: V_SUBBREV_U32_e64 0, undef %vgpr0, killed %vcc, implicit %exec +# GCN: V_SUBBREV_U32_e64 0, undef %vgpr0, killed renamable %vcc, implicit %exec --- name: subbrev @@ -25,7 +25,7 @@ body: | ... # GCN-LABEL: name: subb{{$}} -# GCN: V_SUBB_U32_e64 undef %vgpr0, 0, killed %vcc, implicit %exec +# GCN: V_SUBB_U32_e64 undef %vgpr0, 0, killed renamable %vcc, implicit %exec --- name: subb @@ -49,7 +49,7 @@ body: | ... # GCN-LABEL: name: addc{{$}} -# GCN: V_ADDC_U32_e32 0, undef %vgpr0, implicit-def %vcc, implicit killed %vcc, implicit %exec +# GCN: V_ADDC_U32_e32 0, undef renamable %vgpr0, implicit-def %vcc, implicit killed %vcc, implicit %exec --- name: addc @@ -73,7 +73,7 @@ body: | ... # GCN-LABEL: name: addc2{{$}} -# GCN: V_ADDC_U32_e32 0, undef %vgpr0, implicit-def %vcc, implicit killed %vcc, implicit %exec +# GCN: V_ADDC_U32_e32 0, undef renamable %vgpr0, implicit-def %vcc, implicit killed %vcc, implicit %exec --- name: addc2 diff --git a/llvm/test/CodeGen/AMDGPU/splitkit.mir b/llvm/test/CodeGen/AMDGPU/splitkit.mir index 41782af40e3..45a9c41c381 100644 --- a/llvm/test/CodeGen/AMDGPU/splitkit.mir +++ b/llvm/test/CodeGen/AMDGPU/splitkit.mir @@ -37,13 +37,13 @@ body: | # CHECK: [[REG0:%sgpr[0-9]+]] = COPY %sgpr0 # CHECK: [[REG1:%sgpr[0-9]+]] = COPY %sgpr2 # CHECK: S_NOP 0 -# CHECK: S_NOP 0, implicit [[REG0]] -# CHECK: S_NOP 0, implicit [[REG1]] -# CHECK: %sgpr0 = COPY [[REG0]] -# CHECK: %sgpr2 = COPY [[REG1]] +# CHECK: S_NOP 0, implicit renamable [[REG0]] +# CHECK: S_NOP 0, implicit renamable [[REG1]] +# CHECK: %sgpr0 = COPY renamable [[REG0]] +# CHECK: %sgpr2 = COPY renamable [[REG1]] # CHECK: S_NOP -# CHECK: S_NOP 0, implicit %sgpr0 -# CHECK: S_NOP 0, implicit %sgpr2 +# CHECK: S_NOP 0, implicit renamable %sgpr0 +# CHECK: S_NOP 0, implicit renamable %sgpr2 name: func1 tracksRegLiveness: true body: | @@ -67,8 +67,8 @@ body: | # Check that copy hoisting out of loops works. This mainly should not crash the # compiler when it hoists a subreg copy sequence. # CHECK-LABEL: name: splitHoist -# CHECK: S_NOP 0, implicit-def %sgpr0 -# CHECK: S_NOP 0, implicit-def %sgpr3 +# CHECK: S_NOP 0, implicit-def renamable %sgpr0 +# CHECK: S_NOP 0, implicit-def renamable %sgpr3 # CHECK-NEXT: SI_SPILL_S128_SAVE name: splitHoist tracksRegLiveness: true diff --git a/llvm/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir b/llvm/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir index b41e6ac6fd5..d5bf6a1eb8c 100644 --- a/llvm/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir +++ b/llvm/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir @@ -9,10 +9,10 @@ # CHECK: - { id: 1, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4, # CHECK-NEXT: stack-id: 1, -# CHECK: SI_SPILL_V32_SAVE killed %vgpr0, %stack.0, %sgpr0_sgpr1_sgpr2_sgpr3, %sgpr5, 0, implicit %exec :: (store 4 into %stack.0) +# CHECK: SI_SPILL_V32_SAVE killed renamable %vgpr0, %stack.0, %sgpr0_sgpr1_sgpr2_sgpr3, %sgpr5, 0, implicit %exec :: (store 4 into %stack.0) # CHECK: %vgpr0 = SI_SPILL_V32_RESTORE %stack.0, %sgpr0_sgpr1_sgpr2_sgpr3, %sgpr5, 0, implicit %exec :: (load 4 from %stack.0) -# CHECK: SI_SPILL_S32_SAVE killed %sgpr6, %stack.1, implicit %exec, implicit %sgpr0_sgpr1_sgpr2_sgpr3, implicit %sgpr5, implicit-def dead %m0 :: (store 4 into %stack.1) +# CHECK: SI_SPILL_S32_SAVE killed renamable %sgpr6, %stack.1, implicit %exec, implicit %sgpr0_sgpr1_sgpr2_sgpr3, implicit %sgpr5, implicit-def dead %m0 :: (store 4 into %stack.1) # CHECK: %sgpr6 = SI_SPILL_S32_RESTORE %stack.1, implicit %exec, implicit %sgpr0_sgpr1_sgpr2_sgpr3, implicit %sgpr5, implicit-def dead %m0 :: (load 4 from %stack.1) name: no_merge_sgpr_vgpr_spill_slot diff --git a/llvm/test/CodeGen/AMDGPU/subreg_interference.mir b/llvm/test/CodeGen/AMDGPU/subreg_interference.mir index 6fc22c8d189..3575e41c2b7 100644 --- a/llvm/test/CodeGen/AMDGPU/subreg_interference.mir +++ b/llvm/test/CodeGen/AMDGPU/subreg_interference.mir @@ -12,12 +12,12 @@ # sgpr0-sgpr3. # # CHECK-LABEL: func0 -# CHECK: S_NOP 0, implicit-def %sgpr0 -# CHECK: S_NOP 0, implicit-def %sgpr3 -# CHECK: S_NOP 0, implicit-def %sgpr1 -# CHECK: S_NOP 0, implicit-def %sgpr2 -# CHECK: S_NOP 0, implicit %sgpr0, implicit %sgpr3 -# CHECK: S_NOP 0, implicit %sgpr1, implicit %sgpr2 +# CHECK: S_NOP 0, implicit-def renamable %sgpr0 +# CHECK: S_NOP 0, implicit-def renamable %sgpr3 +# CHECK: S_NOP 0, implicit-def renamable %sgpr1 +# CHECK: S_NOP 0, implicit-def renamable %sgpr2 +# CHECK: S_NOP 0, implicit renamable %sgpr0, implicit renamable %sgpr3 +# CHECK: S_NOP 0, implicit renamable %sgpr1, implicit renamable %sgpr2 name: func0 body: | bb.0: diff --git a/llvm/test/CodeGen/AMDGPU/syncscopes.ll b/llvm/test/CodeGen/AMDGPU/syncscopes.ll index 6e356f69e05..5cea1588d4b 100644 --- a/llvm/test/CodeGen/AMDGPU/syncscopes.ll +++ b/llvm/test/CodeGen/AMDGPU/syncscopes.ll @@ -1,9 +1,9 @@ ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -stop-before=si-debugger-insert-nops < %s | FileCheck --check-prefix=GCN %s ; GCN-LABEL: name: syncscopes -; GCN: FLAT_STORE_DWORD killed %vgpr1_vgpr2, killed %vgpr0, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("agent") seq_cst 4 into %ir.agent_out) -; GCN: FLAT_STORE_DWORD killed %vgpr4_vgpr5, killed %vgpr3, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("workgroup") seq_cst 4 into %ir.workgroup_out) -; GCN: FLAT_STORE_DWORD killed %vgpr7_vgpr8, killed %vgpr6, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("wavefront") seq_cst 4 into %ir.wavefront_out) +; GCN: FLAT_STORE_DWORD killed renamable %vgpr1_vgpr2, killed renamable %vgpr0, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("agent") seq_cst 4 into %ir.agent_out) +; GCN: FLAT_STORE_DWORD killed renamable %vgpr4_vgpr5, killed renamable %vgpr3, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("workgroup") seq_cst 4 into %ir.workgroup_out) +; GCN: FLAT_STORE_DWORD killed renamable %vgpr7_vgpr8, killed renamable %vgpr6, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile store syncscope("wavefront") seq_cst 4 into %ir.wavefront_out) define void @syncscopes( i32 %agent, i32 addrspace(4)* %agent_out, |

