Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / postra-machine-sink.mir
blob4ed71dd06375be3272537e596333c048c9dac4f4
1 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=postra-machine-sink -verify-machineinstrs -o - %s | FileCheck %s
3 # Don't sink copy that writes sub-register of another copy source register
4 # CHECK-LABEL: name: donotsinkcopy
5 # CHECK-LABEL: bb.0:
6 # CHECK: renamable $sgpr1 = COPY renamable $sgpr2
7 # CHECK-LABEL: bb.1:
8 # CHECK: liveins: $sgpr0_sgpr1:0x000000000000000F
9 # CHECK: renamable $vgpr1_vgpr2 = COPY renamable $sgpr0_sgpr1
11 ---
12 name: donotsinkcopy
13 tracksRegLiveness: true
14 body: |
15   bb.0:
16     liveins: $sgpr0, $sgpr2, $vgpr3
17     S_CMP_LT_U32 renamable $sgpr2, target-flags(amdgpu-gotprel32-lo) 2, implicit-def $scc
18     renamable $sgpr1 = COPY renamable $sgpr2
19     renamable $vgpr1_vgpr2 = COPY renamable $sgpr0_sgpr1
20     S_CBRANCH_SCC0 %bb.2, implicit $scc
22   bb.1:
23     liveins: $vgpr2, $sgpr0_sgpr1:0x00000003
24     S_BRANCH %bb.4
26   bb.2:
27     liveins: $sgpr1
29   bb.4:
30    S_ENDPGM 0
31 ...