1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=early-tailduplication -verify-machineinstrs -o - %s | FileCheck %s
3 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -passes=early-tailduplication -o - %s | FileCheck %s
5 # Early tail duplication should not merge bb.6 into bb.5, adding a
6 # non-terminator (S_SLEEP) after the terminator S_MOV_B32_term.
9 name: tail_duplicate_terminator
10 tracksRegLiveness: true
12 ; CHECK-LABEL: name: tail_duplicate_terminator
14 ; CHECK-NEXT: successors: %bb.2(0x80000000)
16 ; CHECK-NEXT: S_BRANCH %bb.2
19 ; CHECK-NEXT: successors: %bb.2(0x80000000)
21 ; CHECK-NEXT: S_SLEEP 1
24 ; CHECK-NEXT: successors: %bb.3(0x80000000)
26 ; CHECK-NEXT: [[S_MOV_B32_term:%[0-9]+]]:sreg_32_xm0_xexec = S_MOV_B32_term $exec_lo
29 ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.4(0x40000000)
31 ; CHECK-NEXT: SI_WATERFALL_LOOP %bb.3, implicit $exec
34 ; CHECK-NEXT: successors: %bb.5(0x80000000)
36 ; CHECK-NEXT: $exec_lo = S_MOV_B32_term [[S_MOV_B32_term]]
39 ; CHECK-NEXT: successors: %bb.1(0x80000000)
41 ; CHECK-NEXT: S_SLEEP 2
42 ; CHECK-NEXT: S_BRANCH %bb.1
50 %0:sreg_32_xm0_xexec = S_MOV_B32_term $exec_lo
53 SI_WATERFALL_LOOP %bb.4, implicit $exec
56 $exec_lo = S_MOV_B32_term %0