Recommit r310809 with a fix for the spill problem
[llvm-core.git] / test / CodeGen / AMDGPU / subreg_interference.mir
blob6fc22c8d189f00fc797d605004dddc96ae7642be
1 # RUN: llc -o - %s -mtriple=amdgcn--amdhsa -verify-machineinstrs -run-pass=greedy,virtregrewriter | FileCheck %s
2 --- |
4   define amdgpu_kernel void @func0() {
5     ret void
6   }
8 ...
10 ---
11 # We should not detect any interference between v0/v1 here and only allocate
12 # sgpr0-sgpr3.
14 # CHECK-LABEL: func0
15 # CHECK: S_NOP 0, implicit-def %sgpr0
16 # CHECK: S_NOP 0, implicit-def %sgpr3
17 # CHECK: S_NOP 0, implicit-def %sgpr1
18 # CHECK: S_NOP 0, implicit-def %sgpr2
19 # CHECK: S_NOP 0, implicit %sgpr0, implicit %sgpr3
20 # CHECK: S_NOP 0, implicit %sgpr1, implicit %sgpr2
21 name: func0
22 body: |
23   bb.0:
24     S_NOP 0, implicit-def undef %0.sub0 : sreg_128
25     S_NOP 0, implicit-def %0.sub3
26     S_NOP 0, implicit-def undef %1.sub1 : sreg_128
27     S_NOP 0, implicit-def %1.sub2
30     S_NOP 0, implicit %0.sub0, implicit %0.sub3
31     S_NOP 0, implicit %1.sub1, implicit %1.sub2
32 ...