blob: a89d0da0fa7345539fbcb16b68dd86319ea3ec77 [file] [log] [blame]
# FIXME: This should fail the verifier
# XFAIL: *
# REQUIRES: amdgpu-registered-target
# RUN: not --crash llc -o - -mtriple=amdgcn-amd-amdhsa -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# %1 is live out of %bb.1 through the loop edge, and therefore the kill flag is invalid.
# CHECK: *** Bad machine code: Virtual register killed in block, but needed live out. ***
---
name: kill_flag_in_loop
body: |
bb.0:
liveins: $sgpr0, $vgpr0_vgpr1
successors: %bb.1(0x80000000)
%0:sreg_32 = COPY $sgpr0
%1:sreg_32 = S_AND_B32 1, killed %0, implicit-def dead $scc
bb.1:
successors: %bb.2(0x40000000), %bb.1(0x40000000)
S_CMP_EQ_I32 killed %1:sreg_32, 1, implicit-def $scc
S_CBRANCH_SCC0 %bb.2, implicit $scc
S_BRANCH %bb.1
bb.2:
successors: %bb.3(0x80000000)
bb.3:
S_ENDPGM 0
...