2018-05-06 05:19:59 +08:00
|
|
|
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GCN
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GCN
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
|
|
|
|
# REQUIRES: global-isel
|
|
|
|
|
|
|
|
--- |
|
2018-05-12 07:12:49 +08:00
|
|
|
define amdgpu_kernel void @global_addrspace(i32 addrspace(1)* %global0,
|
|
|
|
i64 addrspace(1)* %global1,
|
|
|
|
i96 addrspace(1)* %global2,
|
|
|
|
i128 addrspace(1)* %global3) { ret void }
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
...
|
|
|
|
---
|
|
|
|
|
|
|
|
name: global_addrspace
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
|
|
|
|
# GCN: global_addrspace
|
2018-02-01 06:04:26 +08:00
|
|
|
# GCN: [[PTR:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
|
2018-05-12 07:12:49 +08:00
|
|
|
# GCN: [[VAL4:%[0-9]+]]:vgpr_32 = COPY $vgpr2
|
|
|
|
# GCN: [[VAL8:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr4
|
|
|
|
# GCN: [[VAL12:%[0-9]+]]:vreg_96 = COPY $vgpr5_vgpr6_vgpr7
|
|
|
|
# GCN: [[VAL16:%[0-9]+]]:vreg_128 = COPY $vgpr8_vgpr9_vgpr10_vgpr11
|
|
|
|
# GCN: FLAT_STORE_DWORD [[PTR]], [[VAL4]], 0, 0, 0
|
|
|
|
# GCN: FLAT_STORE_DWORDX2 [[PTR]], [[VAL8]], 0, 0, 0
|
|
|
|
# GCN: FLAT_STORE_DWORDX3 [[PTR]], [[VAL12]], 0, 0, 0
|
|
|
|
# GCN: FLAT_STORE_DWORDX4 [[PTR]], [[VAL16]], 0, 0, 0
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-05-12 07:12:49 +08:00
|
|
|
liveins: $vgpr0_vgpr1, $vgpr2, $vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%0:vgpr(p1) = COPY $vgpr0_vgpr1
|
|
|
|
%1:vgpr(s32) = COPY $vgpr2
|
2018-05-12 07:12:49 +08:00
|
|
|
%2:vgpr(s64) = COPY $vgpr3_vgpr4
|
|
|
|
%3:vgpr(s96) = COPY $vgpr5_vgpr6_vgpr7
|
|
|
|
%4:vgpr(s128) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
G_STORE %1, %0 :: (store 4 into %ir.global0)
|
2018-05-12 07:12:49 +08:00
|
|
|
G_STORE %2, %0 :: (store 8 into %ir.global1)
|
|
|
|
G_STORE %3, %0 :: (store 12 into %ir.global2, align 16)
|
|
|
|
G_STORE %4, %0 :: (store 16 into %ir.global3)
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|