48 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 52# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -run-pass=early-machinelicm,si-wqm -o - %s | FileCheck -check-prefix=GCN %s3# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -passes=early-machinelicm,si-wqm -o - %s | FileCheck -check-prefix=GCN %s4 5# Machine LICM may hoist an intruction from a WWM region, which will force SI-WQM pass6# to create a second WWM region. This is an unwanted hoisting.7 8---9name: licm_move_wwm10tracksRegLiveness: true11body: |12 ; GCN-LABEL: name: licm_move_wwm13 ; GCN: bb.0:14 ; GCN-NEXT: successors: %bb.1(0x80000000)15 ; GCN-NEXT: {{ $}}16 ; GCN-NEXT: [[ENTER_STRICT_WWM:%[0-9]+]]:sreg_32 = ENTER_STRICT_WWM -1, implicit-def $exec, implicit-def $scc, implicit $exec17 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1, implicit $exec18 ; GCN-NEXT: $exec_lo = EXIT_STRICT_WWM [[ENTER_STRICT_WWM]]19 ; GCN-NEXT: S_BRANCH %bb.120 ; GCN-NEXT: {{ $}}21 ; GCN-NEXT: bb.1:22 ; GCN-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)23 ; GCN-NEXT: {{ $}}24 ; GCN-NEXT: [[ENTER_STRICT_WWM1:%[0-9]+]]:sreg_32 = ENTER_STRICT_WWM -1, implicit-def $exec, implicit-def $scc, implicit $exec25 ; GCN-NEXT: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[V_MOV_B32_e32_]], implicit $exec26 ; GCN-NEXT: $exec_lo = EXIT_STRICT_WWM [[ENTER_STRICT_WWM1]]27 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY [[V_READFIRSTLANE_B32_]]28 ; GCN-NEXT: $exec_lo = S_OR_B32 $exec_lo, [[COPY]], implicit-def $scc29 ; GCN-NEXT: S_CBRANCH_EXECNZ %bb.1, implicit $exec30 ; GCN-NEXT: S_BRANCH %bb.231 ; GCN-NEXT: {{ $}}32 ; GCN-NEXT: bb.2:33 ; GCN-NEXT: S_ENDPGM 034 bb.0:35 S_BRANCH %bb.136 37 bb.1:38 %0:vgpr_32 = V_MOV_B32_e32 1, implicit $exec39 %1:sreg_32_xm0 = V_READFIRSTLANE_B32 killed %0:vgpr_32, implicit $exec40 early-clobber %2:sreg_32 = STRICT_WWM killed %1:sreg_32_xm0, implicit $exec41 $exec_lo = S_OR_B32 $exec_lo, %2, implicit-def $scc42 S_CBRANCH_EXECNZ %bb.1, implicit $exec43 S_BRANCH %bb.244 45 bb.2:46 S_ENDPGM 047...48