1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
4
5---
6name: wqm_vote_scc
7legalized: true
8
9body: |
10  bb.0:
11    liveins: $sgpr0, $sgpr1
12    ; CHECK-LABEL: name: wqm_vote_scc
13    ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14    ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15    ; CHECK: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
16    ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
17    ; CHECK: [[COPY2:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
18    ; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY2]](s1)
19    %0:_(s32) = COPY $sgpr0
20    %1:_(s32) = COPY $sgpr1
21    %2:_(s1) = G_ICMP intpred(ne), %0, %1
22    %3:_(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), %2
23...
24
25---
26name: wqm_vote_vcc
27legalized: true
28
29body: |
30  bb.0:
31    liveins: $vgpr0, $vgpr1
32    ; CHECK-LABEL: name: wqm_vote_vcc
33    ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
34    ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
35    ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
36    ; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[ICMP]](s1)
37    %0:_(s32) = COPY $vgpr0
38    %1:_(s32) = COPY $vgpr1
39    %2:_(s1) = G_ICMP intpred(ne), %0, %1
40    %3:_(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), %2
41...
42
43---
44name: wqm_vote_sgpr
45legalized: true
46
47body: |
48  bb.0:
49    liveins: $sgpr0, $sgpr1
50    ; CHECK-LABEL: name: wqm_vote_sgpr
51    ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
52    ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
53    ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
54    ; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY1]](s1)
55    %0:_(s32) = COPY $sgpr0
56    %1:_(s1) = G_TRUNC %0
57    %2:_(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), %1
58...
59