| # FIXME: This should fail the verifier | |
| # XFAIL: * | |
| # RUN: not --crash llc -o - -mtriple=amdgpu-amd-amdhsa -run-pass=none %s 2>&1 | FileCheck %s | |
| # $sgpr9 is live out of %bb.1 through the loop edge, and therefore the kill | |
| # flag is invalid. | |
| # CHECK: *** Bad machine code: {{.*}} *** | |
| # CHECK: - instruction: S_CMP_EQ_I32 killed $sgpr9, 1, implicit-def $scc | |
| --- | |
| name: kill_flag_in_loop | |
| body: | | |
| bb.0: | |
| liveins: $sgpr8, $vgpr0_vgpr1 | |
| successors: %bb.1(0x80000000) | |
| $sgpr9 = S_AND_B32 1, killed $sgpr8, implicit-def dead $scc | |
| bb.1: | |
| successors: %bb.2(0x40000000), %bb.1(0x40000000) | |
| liveins: $sgpr9 | |
| S_CMP_EQ_I32 killed $sgpr9, 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 | |
| ... |