1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=si-pre-emit-peephole -verify-machineinstrs %s -o - | FileCheck %s
3 # Make sure mandatory skips are not removed around mode defs.
7 name: need_skip_setreg_imm32_b32
9 ; CHECK-LABEL: name: need_skip_setreg_imm32_b32
11 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
13 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
16 ; CHECK-NEXT: successors: %bb.2(0x80000000)
18 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
19 ; CHECK-NEXT: S_SETREG_IMM32_B32 3, 2177, implicit-def $mode, implicit $mode
22 ; CHECK-NEXT: S_ENDPGM 0
24 successors: %bb.1, %bb.2
25 S_CBRANCH_EXECZ %bb.2, implicit $exec
29 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
30 S_SETREG_IMM32_B32 3, 2177, implicit-def $mode, implicit $mode
38 name: need_skip_setreg_b32
40 ; CHECK-LABEL: name: need_skip_setreg_b32
42 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
43 ; CHECK-NEXT: liveins: $sgpr0
45 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
48 ; CHECK-NEXT: successors: %bb.2(0x80000000)
49 ; CHECK-NEXT: liveins: $sgpr0
51 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
52 ; CHECK-NEXT: S_SETREG_B32 $sgpr0, 3, implicit-def $mode, implicit $mode
55 ; CHECK-NEXT: S_ENDPGM 0
58 successors: %bb.1, %bb.2
59 S_CBRANCH_EXECZ %bb.2, implicit $exec
63 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
64 S_SETREG_B32 $sgpr0, 3, implicit-def $mode, implicit $mode
72 name: need_skip_denorm_mode
74 ; CHECK-LABEL: name: need_skip_denorm_mode
76 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
78 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
81 ; CHECK-NEXT: successors: %bb.2(0x80000000)
83 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
84 ; CHECK-NEXT: S_DENORM_MODE 3, implicit-def $mode, implicit $mode
87 ; CHECK-NEXT: S_ENDPGM 0
89 successors: %bb.1, %bb.2
90 S_CBRANCH_EXECZ %bb.2, implicit $exec
93 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
94 S_DENORM_MODE 3, implicit-def $mode, implicit $mode
102 name: need_skip_round_mode
104 ; CHECK-LABEL: name: need_skip_round_mode
106 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
108 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
111 ; CHECK-NEXT: successors: %bb.2(0x80000000)
113 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
114 ; CHECK-NEXT: S_ROUND_MODE 3, implicit-def $mode, implicit $mode
117 ; CHECK-NEXT: S_ENDPGM 0
119 successors: %bb.1, %bb.2
120 S_CBRANCH_EXECZ %bb.2, implicit $exec
123 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
124 S_ROUND_MODE 3, implicit-def $mode, implicit $mode
132 name: need_skip_writelane_b32
134 ; CHECK-LABEL: name: need_skip_writelane_b32
136 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
138 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
141 ; CHECK-NEXT: successors: %bb.2(0x80000000)
143 ; CHECK-NEXT: $sgpr0 = IMPLICIT_DEF
144 ; CHECK-NEXT: $vgpr0 = V_WRITELANE_B32 $sgpr0, 0, $vgpr0
147 ; CHECK-NEXT: S_ENDPGM 0
149 successors: %bb.1, %bb.2
150 S_CBRANCH_EXECZ %bb.2, implicit $exec
154 $sgpr0 = IMPLICIT_DEF
155 $vgpr0 = V_WRITELANE_B32 $sgpr0, 0, $vgpr0
162 name: need_skip_readlane_b32
164 ; CHECK-LABEL: name: need_skip_readlane_b32
166 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
168 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
171 ; CHECK-NEXT: successors: %bb.2(0x80000000)
173 ; CHECK-NEXT: $vgpr0 = IMPLICIT_DEF
174 ; CHECK-NEXT: $sgpr0 = V_READLANE_B32 $vgpr0, 0
177 ; CHECK-NEXT: S_ENDPGM 0
179 successors: %bb.1, %bb.2
180 S_CBRANCH_EXECZ %bb.2, implicit $exec
184 $vgpr0 = IMPLICIT_DEF
185 $sgpr0 = V_READLANE_B32 $vgpr0, 0