Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / hazard-in-bundle.mir
blob8d02f0614dfc302e4f55e8b58a204e0db3354122
1 # RUN: llc -mtriple=amdgcn -mcpu=gfx902 -mattr=+xnack -verify-machineinstrs -run-pass  post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN,XNACK,GFX9 %s
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=-xnack -verify-machineinstrs -run-pass  post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN,NOXNACK,GFX9 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64,-xnack -verify-machineinstrs -run-pass  post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN,NOXNACK,GFX10 %s
5 # GCN-LABEL: name: break_smem_clause_max_look_ahead_in_bundle
6 # GCN:          S_LOAD_DWORDX2_IMM
7 # XNACK-NEXT:   S_NOP
8 # NOXNACK-NOT:  S_NOP
9 # GCN:          S_LOAD_DWORDX2
10 # XNACK-NEXT:   S_NOP
11 # NOXNACK-NOT:  S_NOP
12 # GCN:          }
13 ---
14 name: break_smem_clause_max_look_ahead_in_bundle
15 body: |
16   bb.0:
17     BUNDLE implicit-def $sgpr6_sgpr7 {
18       $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
19       S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 0, 0
20       S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 4, 0
21       S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 8, 0
22       S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 12, 0
23       S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 16, 0
24       $sgpr14_sgpr15 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
25       $sgpr16_sgpr17 = S_LOAD_DWORDX2_IMM $sgpr14_sgpr15, 0, 0
26     }
27     S_ENDPGM 0
28 ...
30 # GFX10-LABEL: name: hazard_smem_war_in_bundle
31 # GFX10:      S_LOAD_DWORD_IMM
32 # GFX10-NEXT: $sgpr_null = S_MOV_B32 0
33 # GFX10:      V_CMP_EQ_F32
34 ---
35 name: hazard_smem_war_in_bundle
36 body: |
37   bb.0:
38     liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
39     BUNDLE implicit-def $sgpr0_sgpr1 {
40       $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
41       $sgpr0_sgpr1 = V_CMP_EQ_F32_e64 0, $vgpr0, 0, $vgpr1, 1, implicit $mode, implicit $exec
42     }
43     S_ENDPGM 0
44 ...
46 # GFX9-LABEL: name: hazard_ignore_dbg_label_in_bundle
47 # GFX9:      DBG_LABEL 6
48 # GFX9-NEXT: S_NOP 0
49 # GFX9:      S_SENDMSG 3, implicit $exec, implicit $m0
50 ---
51 name: hazard_ignore_dbg_label_in_bundle
52 body: |
53   bb.0:
54     BUNDLE {
55       $m0 = S_MOV_B32 killed $sgpr12
56       DBG_LABEL 0
57       DBG_LABEL 1
58       DBG_LABEL 2
59       DBG_LABEL 3
60       DBG_LABEL 4
61       DBG_LABEL 5
62       DBG_LABEL 6
63       S_SENDMSG 3, implicit $exec, implicit $m0
64     }
65     S_ENDPGM 0
66 ...
68 # GCN-LABEL: name: vmem_vcc_hazard_in_bundle
69 # GCN:      S_LOAD_DWORDX2_IMM
70 # GFX9-NEXT: S_NOP 3
71 # GCN:      BUFFER_LOAD_DWORD_OFFEN
72 ---
73 name: vmem_vcc_hazard_in_bundle
74 body: |
75   bb.0:
76     BUNDLE {
77       $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
78       $vgpr0 = IMPLICIT_DEF
79       $vgpr1 = V_ADDC_U32_e32 $vgpr0, $vgpr0, implicit-def $vcc, implicit $vcc, implicit $exec
80       $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
81       $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $vcc_lo, 0, 0, 0, implicit $exec
82     }
83     S_ENDPGM 0
84 ...