Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AMDGPU/SI: Implement DS_PERMUTE/DS_BPERMUTE Instruction Definitions a…
…nd Intrinsics Summary: This patch impleemnts DS_PERMUTE/DS_BPERMUTE instruction definitions and intrinsics, which are new since VI. Reviewers: tstellarAMD, arsenm Subscribers: llvm-commits, arsenm Differential Revision: http://reviews.llvm.org/D17614 llvm-svn: 262356
- Loading branch information
Changpeng Fang
committed
Mar 1, 2016
1 parent
d176d74
commit 24f035a
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck %s | ||
|
||
declare i32 @llvm.amdgcn.ds.bpermute(i32, i32) #0 | ||
|
||
; FUNC-LABEL: {{^}}ds_bpermute: | ||
; CHECK: ds_bpermute_b32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} | ||
define void @ds_bpermute(i32 addrspace(1)* %out, i32 %index, i32 %src) nounwind { | ||
%bpermute = call i32 @llvm.amdgcn.ds.bpermute(i32 %index, i32 %src) #0 | ||
store i32 %bpermute, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
attributes #0 = { nounwind readnone convergent } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck %s | ||
|
||
declare i32 @llvm.amdgcn.ds.permute(i32, i32) #0 | ||
|
||
; FUNC-LABEL: {{^}}ds_permute: | ||
; CHECK: ds_permute_b32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} | ||
define void @ds_permute(i32 addrspace(1)* %out, i32 %index, i32 %src) nounwind { | ||
%bpermute = call i32 @llvm.amdgcn.ds.permute(i32 %index, i32 %src) #0 | ||
store i32 %bpermute, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
attributes #0 = { nounwind readnone convergent } |