forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
R600: Add BFE, BFI, and BFM intrinsics to help with writing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205236 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
7 changed files
with
194 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s | ||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s | ||
|
||
declare i32 @llvm.AMDGPU.bfe.i32(i32, i32, i32) nounwind readnone | ||
|
||
; FUNC-LABEL: @bfe_i32_arg_arg_arg | ||
; SI: V_BFE_I32 | ||
; EG: BFE_INT | ||
define void @bfe_i32_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind { | ||
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 %src1, i32 %src1) nounwind readnone | ||
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_i32_arg_arg_imm | ||
; SI: V_BFE_I32 | ||
; EG: BFE_INT | ||
define void @bfe_i32_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind { | ||
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 %src1, i32 123) nounwind readnone | ||
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_i32_arg_imm_arg | ||
; SI: V_BFE_I32 | ||
; EG: BFE_INT | ||
define void @bfe_i32_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind { | ||
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 123, i32 %src2) nounwind readnone | ||
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_i32_imm_arg_arg | ||
; SI: V_BFE_I32 | ||
; EG: BFE_INT | ||
define void @bfe_i32_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind { | ||
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 123, i32 %src1, i32 %src2) nounwind readnone | ||
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} |
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,40 @@ | ||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s | ||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s | ||
|
||
declare i32 @llvm.AMDGPU.bfe.u32(i32, i32, i32) nounwind readnone | ||
|
||
; FUNC-LABEL: @bfe_u32_arg_arg_arg | ||
; SI: V_BFE_U32 | ||
; EG: BFE_UINT | ||
define void @bfe_u32_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind { | ||
%bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 %src1, i32 %src1) nounwind readnone | ||
store i32 %bfe_u32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_u32_arg_arg_imm | ||
; SI: V_BFE_U32 | ||
; EG: BFE_UINT | ||
define void @bfe_u32_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind { | ||
%bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 %src1, i32 123) nounwind readnone | ||
store i32 %bfe_u32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_u32_arg_imm_arg | ||
; SI: V_BFE_U32 | ||
; EG: BFE_UINT | ||
define void @bfe_u32_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind { | ||
%bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 123, i32 %src2) nounwind readnone | ||
store i32 %bfe_u32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfe_u32_imm_arg_arg | ||
; SI: V_BFE_U32 | ||
; EG: BFE_UINT | ||
define void @bfe_u32_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind { | ||
%bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 123, i32 %src1, i32 %src2) nounwind readnone | ||
store i32 %bfe_u32, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} |
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,41 @@ | ||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s | ||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s | ||
|
||
declare i32 @llvm.AMDGPU.bfi(i32, i32, i32) nounwind readnone | ||
|
||
; FUNC-LABEL: @bfi_arg_arg_arg | ||
; SI: V_BFI_B32 | ||
; EG: BFI_INT | ||
define void @bfi_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind { | ||
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 %src1) nounwind readnone | ||
store i32 %bfi, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfi_arg_arg_imm | ||
; SI: V_BFI_B32 | ||
; EG: BFI_INT | ||
define void @bfi_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind { | ||
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 123) nounwind readnone | ||
store i32 %bfi, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfi_arg_imm_arg | ||
; SI: V_BFI_B32 | ||
; EG: BFI_INT | ||
define void @bfi_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind { | ||
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 123, i32 %src2) nounwind readnone | ||
store i32 %bfi, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfi_imm_arg_arg | ||
; SI: V_BFI_B32 | ||
; EG: BFI_INT | ||
define void @bfi_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind { | ||
%bfi = call i32 @llvm.AMDGPU.bfi(i32 123, i32 %src1, i32 %src2) nounwind readnone | ||
store i32 %bfi, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
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,40 @@ | ||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s | ||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s | ||
|
||
declare i32 @llvm.AMDGPU.bfm(i32, i32) nounwind readnone | ||
|
||
; FUNC-LABEL: @bfm_arg_arg | ||
; SI: V_BFM | ||
; EG: BFM_INT | ||
define void @bfm_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind { | ||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 %src0, i32 %src1) nounwind readnone | ||
store i32 %bfm, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfm_arg_imm | ||
; SI: V_BFM | ||
; EG: BFM_INT | ||
define void @bfm_arg_imm(i32 addrspace(1)* %out, i32 %src0) nounwind { | ||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 %src0, i32 123) nounwind readnone | ||
store i32 %bfm, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfm_imm_arg | ||
; SI: V_BFM | ||
; EG: BFM_INT | ||
define void @bfm_imm_arg(i32 addrspace(1)* %out, i32 %src1) nounwind { | ||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 123, i32 %src1) nounwind readnone | ||
store i32 %bfm, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} | ||
|
||
; FUNC-LABEL: @bfm_imm_imm | ||
; SI: V_BFM | ||
; EG: BFM_INT | ||
define void @bfm_imm_imm(i32 addrspace(1)* %out) nounwind { | ||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 123, i32 456) nounwind readnone | ||
store i32 %bfm, i32 addrspace(1)* %out, align 4 | ||
ret void | ||
} |