Skip to content

Commit a42eeea

Browse files
committed
AMDGPU/GlobalISel: RegBankSelect llvm.amdgcn.ds.swizzle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372297 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8e9cc23 commit a42eeea

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,6 +2388,7 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
23882388
case Intrinsic::amdgcn_wwm:
23892389
case Intrinsic::amdgcn_wqm:
23902390
return getDefaultMappingVOP(MI);
2391+
case Intrinsic::amdgcn_ds_swizzle:
23912392
case Intrinsic::amdgcn_ds_permute:
23922393
case Intrinsic::amdgcn_ds_bpermute:
23932394
case Intrinsic::amdgcn_update_dpp:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs %s -o - | FileCheck %s
3+
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs %s -o - | FileCheck %s
4+
5+
---
6+
name: ds_swizzle_s
7+
legalized: true
8+
tracksRegLiveness: true
9+
body: |
10+
bb.0:
11+
liveins: $sgpr0
12+
13+
; CHECK-LABEL: name: ds_swizzle_s
14+
; CHECK: liveins: $sgpr0
15+
; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16+
; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
17+
; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.ds.swizzle), [[COPY1]](s32), 0
18+
%0:_(s32) = COPY $sgpr0
19+
%1:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.ds.swizzle), %0, 0
20+
21+
...

0 commit comments

Comments
 (0)