Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / GlobalISel / regbankselect-amdgcn.wqm.demote.mir
blob7039ae7ce0344f9fee33a032c62a2ddd258c8c4f
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs -o -  %s| FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-greedy -verify-machineinstrs -o -  %s| FileCheck %s
5 ---
6 name: wqm_demote_scc
7 legalized: true
9 body: |
10   bb.0:
11     liveins: $sgpr0, $sgpr1
12     ; CHECK-LABEL: name: wqm_demote_scc
13     ; CHECK: liveins: $sgpr0, $sgpr1
14     ; CHECK-NEXT: {{  $}}
15     ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16     ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
18     ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
19     ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
20     ; CHECK-NEXT: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), [[COPY2]](s1)
21     %0:_(s32) = COPY $sgpr0
22     %1:_(s32) = COPY $sgpr1
23     %2:_(s1) = G_ICMP intpred(eq), %0, %1
24     G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), %2
25 ...
27 ---
28 name: wqm_demote_vcc
29 legalized: true
31 body: |
32   bb.0:
33     liveins: $vgpr0, $vgpr1
34     ; CHECK-LABEL: name: wqm_demote_vcc
35     ; CHECK: liveins: $vgpr0, $vgpr1
36     ; CHECK-NEXT: {{  $}}
37     ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
38     ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
39     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
40     ; CHECK-NEXT: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), [[ICMP]](s1)
41     %0:_(s32) = COPY $vgpr0
42     %1:_(s32) = COPY $vgpr1
43     %2:_(s1) = G_ICMP intpred(eq), %0, %1
44     G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), %2
45 ...
47 ---
48 name: wqm_demote_constant_true
49 legalized: true
51 body: |
52   bb.0:
53     ; CHECK-LABEL: name: wqm_demote_constant_true
54     ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 1
55     ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[C]](s32)
56     ; CHECK-NEXT: [[COPY:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
57     ; CHECK-NEXT: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), [[COPY]](s1)
58     %0:_(s1) = G_CONSTANT i1 true
59     G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), %0
60 ...
62 ---
63 name: wqm_demote_constant_false
64 legalized: true
66 body: |
67   bb.0:
68     ; CHECK-LABEL: name: wqm_demote_constant_false
69     ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
70     ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[C]](s32)
71     ; CHECK-NEXT: [[COPY:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
72     ; CHECK-NEXT: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), [[COPY]](s1)
73     %0:_(s1) = G_CONSTANT i1 false
74     G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.wqm.demote), %0
75 ...