• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: ctlz_zero_undef_s32_s
7legalized: true
8
9body: |
10  bb.0:
11    liveins: $sgpr0
12    ; CHECK-LABEL: name: ctlz_zero_undef_s32_s
13    ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14    ; CHECK: [[CTLZ_ZERO_UNDEF:%[0-9]+]]:sgpr(s32) = G_CTLZ_ZERO_UNDEF [[COPY]](s32)
15    ; CHECK: S_ENDPGM 0, implicit [[CTLZ_ZERO_UNDEF]](s32)
16    %0:_(s32) = COPY $sgpr0
17    %1:_(s32) = G_CTLZ_ZERO_UNDEF %0
18    S_ENDPGM 0, implicit %1
19...
20
21---
22name: ctlz_zero_undef_s32_v
23legalized: true
24
25body: |
26  bb.0:
27    liveins: $vgpr0_vgpr1
28    ; CHECK-LABEL: name: ctlz_zero_undef_s32_v
29    ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
30    ; CHECK: [[CTLZ_ZERO_UNDEF:%[0-9]+]]:vgpr(s32) = G_CTLZ_ZERO_UNDEF [[COPY]](s32)
31    ; CHECK: S_ENDPGM 0, implicit [[CTLZ_ZERO_UNDEF]](s32)
32    %0:_(s32) = COPY $vgpr0
33    %1:_(s32) = G_CTLZ_ZERO_UNDEF %0
34    S_ENDPGM 0, implicit %1
35...
36
37---
38name: ctlz_zero_undef_s64_s
39legalized: true
40
41body: |
42  bb.0:
43    liveins: $sgpr0_sgpr1
44    ; CHECK-LABEL: name: ctlz_zero_undef_s64_s
45    ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
46    ; CHECK: [[CTLZ_ZERO_UNDEF:%[0-9]+]]:sgpr(s32) = G_CTLZ_ZERO_UNDEF [[COPY]](s64)
47    ; CHECK: S_ENDPGM 0, implicit [[CTLZ_ZERO_UNDEF]](s32)
48    %0:_(s64) = COPY $sgpr0_sgpr1
49    %1:_(s32) = G_CTLZ_ZERO_UNDEF %0
50    S_ENDPGM 0, implicit %1
51...
52
53---
54name: ctlz_zero_undef_s64_v
55legalized: true
56
57body: |
58  bb.0:
59    liveins: $vgpr0_vgpr1
60    ; CHECK-LABEL: name: ctlz_zero_undef_s64_v
61    ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
62    ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
63    ; CHECK: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
64    ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[UV1]](s32), [[C]]
65    ; CHECK: [[CTLZ_ZERO_UNDEF:%[0-9]+]]:vgpr(s32) = G_CTLZ_ZERO_UNDEF [[UV]](s32)
66    ; CHECK: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 32
67    ; CHECK: [[ADD:%[0-9]+]]:vgpr(s32) = G_ADD [[CTLZ_ZERO_UNDEF]], [[C1]]
68    ; CHECK: [[CTLZ_ZERO_UNDEF1:%[0-9]+]]:vgpr(s32) = G_CTLZ_ZERO_UNDEF [[UV1]](s32)
69    ; CHECK: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[ADD]], [[CTLZ_ZERO_UNDEF1]]
70    ; CHECK: S_ENDPGM 0, implicit [[SELECT]](s32)
71    %0:_(s64) = COPY $vgpr0_vgpr1
72    %1:_(s32) = G_CTLZ_ZERO_UNDEF %0
73    S_ENDPGM 0, implicit %1
74...
75