1# RUN: llc -march=amdgcn -mcpu=gfx902 -o - %s -run-pass si-form-memory-clauses -verify-machineinstrs | FileCheck -check-prefix=XNACK %s
2
3# The SIFormMemoryClauses pass must not form a clause (indicated by BUNDLE)
4# from the two adjacent smem instructions, because the first one has its
5# result coalesced with an operand.
6
7# XNACK-LABEL: body:
8# XNACK-NOT: BUNDLE
9
10---
11name:            _amdgpu_cs_main
12alignment:       1
13exposesReturnsTwice: false
14legalized:       false
15regBankSelected: false
16selected:        false
17failedISel:      false
18tracksRegLiveness: true
19hasWinCFI:       false
20fixedStack:      []
21stack:           []
22constants:       []
23body:             |
24  bb.0:
25    liveins: $sgpr2, $sgpr3, $sgpr12, $sgpr13, $sgpr14, $vgpr0, $vgpr1
26
27    %0:vgpr_32 = COPY $vgpr1
28    %1:sgpr_32 = COPY $sgpr12
29    %2:sgpr_32 = COPY $sgpr3
30    undef %3.sub0:sgpr_128 = COPY $sgpr2
31    %4:vgpr_32 = COPY $vgpr0
32    %5:sgpr_32 = COPY $sgpr14
33    %6:sgpr_32 = COPY $sgpr13
34    %7:sreg_64_xexec = S_GETPC_B64
35    %7.sub0:sreg_64_xexec = COPY %1
36    %3.sub1:sgpr_128 = S_AND_B32 %2, 65535, implicit-def dead $scc
37    %3.sub3:sgpr_128 = S_MOV_B32 151468
38    %3.sub2:sgpr_128 = S_MOV_B32 -1
39    %7.sub0:sreg_64_xexec = S_LOAD_DWORD_IMM %7, 48, 0, 0 :: (load 4 from `i8 addrspace(4)* undef`, addrspace 4)
40    %8:sreg_64_xexec = S_BUFFER_LOAD_DWORDX2_IMM %3, 640, 0, 0 :: (dereferenceable invariant load 8)
41    undef %9.sub0:vreg_128 = V_LSHL_ADD_U32 %6, 4, %4, implicit $exec
42    %9.sub1:vreg_128 = V_LSHL_ADD_U32 %5, 4, %0, implicit $exec
43    S_ENDPGM 0
44
45...
46
47
48
49