2018-06-15 03:26:37 +08:00
|
|
|
# RUN: llc -march=amdgcn -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefixes=GCN
|
AMDGPU/GlobalISel: Select amdgcn.cvt.pkrtz to 64-bit instructions
Summary: The 32-bit variants do not exist on VI+.
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D52958
llvm-svn: 343985
2018-10-09 01:49:29 +08:00
|
|
|
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefixes=GCN
|
2018-06-15 03:26:37 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
define void @cvt_pkrtz(i32 addrspace(1)* %global0) { ret void }
|
|
|
|
...
|
|
|
|
---
|
|
|
|
|
|
|
|
name: cvt_pkrtz
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
|
|
|
|
# GCN-LABEL: name: cvt_pkrtz
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0, $vgpr0, $vgpr1, $vgpr3_vgpr4
|
|
|
|
|
|
|
|
; GCN: [[SGPR0:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
|
|
|
|
%0:sgpr(s32) = COPY $sgpr0
|
|
|
|
; GCN: [[VGPR0:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
|
|
%1:vgpr(s32) = COPY $vgpr0
|
|
|
|
; GCN: [[VGPR1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
|
|
|
|
%2:vgpr(s32) = COPY $vgpr1
|
2019-01-27 23:57:23 +08:00
|
|
|
%3:vgpr(p1) = COPY $vgpr3_vgpr4
|
2018-06-15 03:26:37 +08:00
|
|
|
|
|
|
|
; cvt_pkrtz vs
|
AMDGPU/GlobalISel: Select amdgcn.cvt.pkrtz to 64-bit instructions
Summary: The 32-bit variants do not exist on VI+.
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D52958
llvm-svn: 343985
2018-10-09 01:49:29 +08:00
|
|
|
; GCN: V_CVT_PKRTZ_F16_F32_e64 0, [[VGPR0]], 0, [[SGPR0]]
|
2018-06-15 03:26:37 +08:00
|
|
|
%4:vgpr(<2 x s16>) = G_INTRINSIC intrinsic(@llvm.amdgcn.cvt.pkrtz), %1, %0
|
|
|
|
|
|
|
|
; cvt_pkrtz sv
|
AMDGPU/GlobalISel: Select amdgcn.cvt.pkrtz to 64-bit instructions
Summary: The 32-bit variants do not exist on VI+.
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D52958
llvm-svn: 343985
2018-10-09 01:49:29 +08:00
|
|
|
; GCN: V_CVT_PKRTZ_F16_F32_e64 0, [[SGPR0]], 0, [[VGPR0]]
|
2018-06-15 03:26:37 +08:00
|
|
|
%5:vgpr(<2 x s16>) = G_INTRINSIC intrinsic(@llvm.amdgcn.cvt.pkrtz), %0, %1
|
|
|
|
|
|
|
|
; cvt_pkrtz vv
|
AMDGPU/GlobalISel: Select amdgcn.cvt.pkrtz to 64-bit instructions
Summary: The 32-bit variants do not exist on VI+.
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D52958
llvm-svn: 343985
2018-10-09 01:49:29 +08:00
|
|
|
; GCN: V_CVT_PKRTZ_F16_F32_e64 0, [[VGPR0]], 0, [[VGPR1]]
|
2018-06-15 03:26:37 +08:00
|
|
|
%6:vgpr(<2 x s16>) = G_INTRINSIC intrinsic(@llvm.amdgcn.cvt.pkrtz), %1, %2
|
|
|
|
|
|
|
|
%7:vgpr(s32) = G_BITCAST %4
|
|
|
|
%8:vgpr(s32) = G_BITCAST %5
|
|
|
|
%9:vgpr(s32) = G_BITCAST %6
|
2019-01-27 23:57:23 +08:00
|
|
|
G_STORE %7, %3 :: (store 4 into %ir.global0, addrspace 1)
|
|
|
|
G_STORE %8, %3 :: (store 4 into %ir.global0, addrspace 1)
|
|
|
|
G_STORE %9, %3 :: (store 4 into %ir.global0, addrspace 1)
|
2018-06-15 03:26:37 +08:00
|
|
|
...
|
|
|
|
---
|