• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=amdgcn  -run-pass=early-machinelicm -o - %s | FileCheck %s
2
3# Test to check machine LICM does not hoist convergent instructions,
4# DS_PERMUTE_B32 in this example.
5
6---
7# CHECK-LABEL: name: _amdgpu_cs_main
8# CHECK: bb.1:
9# CHECK: DS_PERMUTE_B32
10
11name: _amdgpu_cs_main
12body: |
13  bb.0:
14    liveins: $vgpr0, $vgpr1
15    successors: %bb.1
16
17    %0:vgpr_32 = COPY $vgpr0
18    %1:vgpr_32 = COPY $vgpr1
19
20  bb.1:
21    successors: %bb.1, %bb.2
22
23    %2:vgpr_32 = DS_PERMUTE_B32 %0, %1, 0, implicit $exec
24    %3:vgpr_32 = V_ADD_CO_U32_e32 %0, %2, implicit-def $vcc, implicit $exec
25    S_CBRANCH_SCC1 %bb.1, implicit undef $scc
26    S_BRANCH %bb.2
27
28  bb.2:
29    $vgpr0 = COPY %3
30    S_ENDPGM 0
31
32...
33