• 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=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
3# RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*'  %s -o /dev/null 2>&1 | FileCheck -check-prefix=SI-ERR %s
4
5# SI-ERR: remark: <unknown>:0:0: cannot select: %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2:sgpr(s16), %1:vgpr(s32) (in function: ldexp_s16_vsv)
6# SI-ERR-NEXT: remark: <unknown>:0:0: cannot select: %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2:vgpr(s16), %1:sgpr(s32) (in function: ldexp_s16_vvs)
7# SI-ERR-NEXT: remark: <unknown>:0:0: cannot select: %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2:vgpr(s16), %1:vgpr(s32) (in function: ldexp_s16_vvv)
8
9---
10name: ldexp_s16_vsv
11legalized: true
12regBankSelected: true
13tracksRegLiveness: true
14
15body: |
16  bb.0:
17    liveins: $sgpr0, $vgpr0
18    ; GCN-LABEL: name: ldexp_s16_vsv
19    ; GCN: liveins: $sgpr0, $vgpr0
20    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
21    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
22    ; GCN: %3:vgpr_32 = nofpexcept V_LDEXP_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec
23    ; GCN: S_ENDPGM 0, implicit %3
24    %0:sgpr(s32) = COPY $sgpr0
25    %1:vgpr(s32) = COPY $vgpr0
26    %2:sgpr(s16) = G_TRUNC %0
27    %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2, %1
28    S_ENDPGM 0, implicit %3
29...
30
31---
32name: ldexp_s16_vvs
33legalized: true
34regBankSelected: true
35tracksRegLiveness: true
36
37body: |
38  bb.0:
39    liveins: $sgpr0, $vgpr0
40    ; GCN-LABEL: name: ldexp_s16_vvs
41    ; GCN: liveins: $sgpr0, $vgpr0
42    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
43    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
44    ; GCN: %3:vgpr_32 = nofpexcept V_LDEXP_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec
45    ; GCN: S_ENDPGM 0, implicit %3
46    %0:vgpr(s32) = COPY $vgpr0
47    %1:sgpr(s32) = COPY $sgpr0
48    %2:vgpr(s16) = G_TRUNC %0
49    %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2, %1
50    S_ENDPGM 0, implicit %3
51...
52
53---
54name: ldexp_s16_vvv
55legalized: true
56regBankSelected: true
57tracksRegLiveness: true
58
59body: |
60  bb.0:
61    liveins: $vgpr0, $vgpr1
62    ; GCN-LABEL: name: ldexp_s16_vvv
63    ; GCN: liveins: $vgpr0, $vgpr1
64    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
65    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
66    ; GCN: %3:vgpr_32 = nofpexcept V_LDEXP_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec
67    ; GCN: S_ENDPGM 0, implicit %3
68    %0:vgpr(s32) = COPY $vgpr0
69    %1:vgpr(s32) = COPY $vgpr1
70    %2:vgpr(s16) = G_TRUNC %0
71    %3:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.ldexp), %2, %1
72    S_ENDPGM 0, implicit %3
73...
74