[llvm] 1038228 - AMDGPU: Add missing tests for copyPhysReg AGPR tuples
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 12:28:03 PDT 2020
Author: Matt Arsenault
Date: 2020-07-16T15:27:57-04:00
New Revision: 10382285ac704737aa8e5bd459f53d3c8eb36032
URL: https://github.com/llvm/llvm-project/commit/10382285ac704737aa8e5bd459f53d3c8eb36032
DIFF: https://github.com/llvm/llvm-project/commit/10382285ac704737aa8e5bd459f53d3c8eb36032.diff
LOG: AMDGPU: Add missing tests for copyPhysReg AGPR tuples
Added:
Modified:
llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir b/llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
index ca7012607aa1..e45ab97d46a8 100644
--- a/llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
+++ b/llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
@@ -3,18 +3,30 @@
--- |
define amdgpu_kernel void @a_to_v() #0 { ret void }
+ define amdgpu_kernel void @a2_to_v2() #0 { ret void }
+ define amdgpu_kernel void @a3_to_v3() #0 { ret void }
define amdgpu_kernel void @a4_to_v4() #0 { ret void }
define amdgpu_kernel void @a16_to_v16() #0 { ret void }
define amdgpu_kernel void @v_to_a() #0 { ret void }
+ define amdgpu_kernel void @v2_to_a2() #0 { ret void }
+ define amdgpu_kernel void @v3_to_a3() #0 { ret void }
define amdgpu_kernel void @v4_to_a4() #0 { ret void }
+ define amdgpu_kernel void @v8_to_a8() #0 { ret void }
define amdgpu_kernel void @v16_to_a16() #0 { ret void }
define amdgpu_kernel void @s_to_a() #0 { ret void }
define amdgpu_kernel void @s2_to_a2() #0 { ret void }
+ define amdgpu_kernel void @s3_to_a3() #0 { ret void }
+ define amdgpu_kernel void @s4_to_a4() #0 { ret void }
+ define amdgpu_kernel void @s6_to_a6() #0 { ret void }
+ define amdgpu_kernel void @s8_to_a8() #0 { ret void }
define amdgpu_kernel void @a_to_a() #0 { ret void }
define amdgpu_kernel void @a2_to_a2() #0 { ret void }
+ define amdgpu_kernel void @a3_to_a3() #0 { ret void }
+ define amdgpu_kernel void @a4_to_a4() #0 { ret void }
+ define amdgpu_kernel void @a8_to_a8() #0 { ret void }
define amdgpu_kernel void @a_to_a_spill() #0 { ret void }
attributes #0 = { "amdgpu-flat-work-group-size"="1,256" }
@@ -34,6 +46,39 @@ body: |
S_ENDPGM 0, implicit $vgpr0
...
+---
+name: a2_to_v2
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $agpr0_agpr1
+
+ ; GCN-LABEL: name: a2_to_v2
+ ; GCN: liveins: $agpr0_agpr1
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 $agpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $agpr0_agpr1
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 $agpr1, implicit $exec, implicit killed $agpr0_agpr1, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $vgpr0_vgpr1
+ $vgpr0_vgpr1 = COPY killed $agpr0_agpr1, implicit $exec
+ S_ENDPGM 0, implicit $vgpr0_vgpr1
+...
+
+---
+name: a3_to_v3
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $agpr0_agpr1_agpr2
+
+ ; GCN-LABEL: name: a3_to_v3
+ ; GCN: liveins: $agpr0_agpr1_agpr2
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 $agpr0, implicit $exec, implicit-def $vgpr0_vgpr1_vgpr2, implicit $agpr0_agpr1_agpr2
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 $agpr1, implicit $exec, implicit $agpr0_agpr1_agpr2
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 $agpr2, implicit $exec, implicit killed $agpr0_agpr1_agpr2, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $vgpr0_vgpr1_vgpr2
+ $vgpr0_vgpr1_vgpr2 = COPY killed $agpr0_agpr1_agpr2, implicit $exec
+ S_ENDPGM 0, implicit $vgpr0_vgpr1_vgpr2
+...
+
---
name: a4_to_v4
tracksRegLiveness: true
@@ -94,6 +139,37 @@ body: |
S_ENDPGM 0, implicit $agpr0
...
+---
+name: v2_to_a2
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1
+ ; GCN-LABEL: name: v2_to_a2
+ ; GCN: liveins: $vgpr0_vgpr1
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 $vgpr0, implicit $exec, implicit-def $agpr0_agpr1, implicit $vgpr0_vgpr1
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 $vgpr1, implicit $exec, implicit killed $vgpr0_vgpr1, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1
+ $agpr0_agpr1 = COPY killed $vgpr0_vgpr1, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1
+...
+
+---
+name: v3_to_a3
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1_vgpr2
+ ; GCN-LABEL: name: v3_to_a3
+ ; GCN: liveins: $vgpr0_vgpr1_vgpr2
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 $vgpr0, implicit $exec, implicit-def $agpr0_agpr1_agpr2, implicit $vgpr0_vgpr1_vgpr2
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 $vgpr2, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2
+ $agpr0_agpr1_agpr2 = COPY killed $vgpr0_vgpr1_vgpr2, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2
+...
+
---
name: v4_to_a4
tracksRegLiveness: true
@@ -111,6 +187,27 @@ body: |
S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3
...
+---
+name: v8_to_a8
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN-LABEL: name: v8_to_a8
+ ; GCN: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 $vgpr0, implicit $exec, implicit-def $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 $vgpr1, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 $vgpr2, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 $vgpr3, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr4 = V_ACCVGPR_WRITE_B32 $vgpr4, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr5 = V_ACCVGPR_WRITE_B32 $vgpr5, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr6 = V_ACCVGPR_WRITE_B32 $vgpr6, implicit $exec, implicit $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: $agpr7 = V_ACCVGPR_WRITE_B32 $vgpr7, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7
+ $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7 = COPY killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7
+...
+
---
name: v16_to_a16
tracksRegLiveness: true
@@ -172,6 +269,100 @@ body: |
S_ENDPGM 0, implicit $agpr0_agpr1
...
+---
+name: s3_to_a3
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $sgpr0_sgpr1_sgpr2
+ ; GCN-LABEL: name: s3_to_a3
+ ; GCN: liveins: $sgpr0_sgpr1_sgpr2
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2
+ $agpr0_agpr1_agpr2 = COPY killed $sgpr0_sgpr1_sgpr2, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2
+...
+
+---
+name: s4_to_a4
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $sgpr0_sgpr1_sgpr2_sgpr3
+ ; GCN-LABEL: name: s4_to_a4
+ ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr3, implicit $exec
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3
+ $agpr0_agpr1_agpr2_agpr3 = COPY killed $sgpr0_sgpr1_sgpr2_sgpr3, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3
+...
+
+---
+name: s6_to_a6
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5
+ ; GCN-LABEL: name: s6_to_a6
+ ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr3, implicit $exec
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr4, implicit $exec
+ ; GCN: $agpr4 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec
+ ; GCN: $agpr5 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5
+ $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5 = COPY killed $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5
+...
+
+---
+name: s8_to_a8
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
+ ; GCN-LABEL: name: s8_to_a8
+ ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec
+ ; GCN: $agpr0 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec
+ ; GCN: $agpr1 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr3, implicit $exec
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr4, implicit $exec
+ ; GCN: $agpr4 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec
+ ; GCN: $agpr5 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr0 = V_MOV_B32_e32 killed $sgpr6, implicit $exec
+ ; GCN: $agpr6 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr1 = V_MOV_B32_e32 killed $sgpr7, implicit $exec
+ ; GCN: $agpr7 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7
+ $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7 = COPY killed $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, implicit $exec
+ S_ENDPGM 0, implicit $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7
+...
+
---
name: a_to_a
tracksRegLiveness: true
@@ -204,6 +395,74 @@ body: |
S_ENDPGM 0, implicit $agpr1_agpr2
...
+---
+name: a3_to_a3
+tracksRegLiveness: true
+body: |
+ bb.0:
+ ; GCN-LABEL: name: a3_to_a3
+ ; GCN: $agpr0_agpr1_agpr2 = IMPLICIT_DEF
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 killed $agpr2, implicit $exec
+ ; GCN: $agpr4 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr2_agpr3_agpr4
+ $agpr0_agpr1_agpr2 = IMPLICIT_DEF
+ $agpr2_agpr3_agpr4 = COPY killed $agpr0_agpr1_agpr2, implicit $exec
+ S_ENDPGM 0, implicit $agpr2_agpr3_agpr4
+...
+
+---
+name: a4_to_a4
+tracksRegLiveness: true
+body: |
+ bb.0:
+ ; GCN-LABEL: name: a4_to_a4
+ ; GCN: $agpr0_agpr1_agpr2_agpr3 = IMPLICIT_DEF
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr3, implicit $exec
+ ; GCN: $agpr5 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 killed $agpr2, implicit $exec
+ ; GCN: $agpr4 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
+ ; GCN: $agpr3 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec
+ ; GCN: $agpr2 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr2_agpr3_agpr4_agpr5
+ $agpr0_agpr1_agpr2_agpr3 = IMPLICIT_DEF
+ $agpr2_agpr3_agpr4_agpr5 = COPY killed $agpr0_agpr1_agpr2_agpr3, implicit $exec
+ S_ENDPGM 0, implicit $agpr2_agpr3_agpr4_agpr5
+...
+
+---
+name: a8_to_a8
+tracksRegLiveness: true
+body: |
+ bb.0:
+ ; GCN-LABEL: name: a8_to_a8
+ ; GCN: $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7 = IMPLICIT_DEF
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr7, implicit $exec
+ ; GCN: $agpr15 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr6, implicit $exec
+ ; GCN: $agpr14 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 killed $agpr5, implicit $exec
+ ; GCN: $agpr13 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr4, implicit $exec
+ ; GCN: $agpr12 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr3, implicit $exec
+ ; GCN: $agpr11 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec
+ ; GCN: $vgpr1 = V_ACCVGPR_READ_B32 killed $agpr2, implicit $exec
+ ; GCN: $agpr10 = V_ACCVGPR_WRITE_B32 killed $vgpr1, implicit $exec
+ ; GCN: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
+ ; GCN: $agpr9 = V_ACCVGPR_WRITE_B32 killed $vgpr0, implicit $exec
+ ; GCN: $vgpr2 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec
+ ; GCN: $agpr8 = V_ACCVGPR_WRITE_B32 killed $vgpr2, implicit $exec, implicit $exec
+ ; GCN: S_ENDPGM 0, implicit $agpr8_agpr9_agpr10_agpr11_agpr12_agpr13_agpr14_agpr15
+ $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7 = IMPLICIT_DEF
+ $agpr8_agpr9_agpr10_agpr11_agpr12_agpr13_agpr14_agpr15 = COPY killed $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7, implicit $exec
+ S_ENDPGM 0, implicit $agpr8_agpr9_agpr10_agpr11_agpr12_agpr13_agpr14_agpr15
+...
# Using last vgpr255 will raise error about absence of emergency spill slot.
More information about the llvm-commits
mailing list