mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
R600/SI: implement SI.load.const intrinsic
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177273 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13e876b27b
commit
b3affde955
@ -1403,6 +1403,18 @@ def : Pat <
|
||||
(V_CNDMASK_B32_e64 (i32 0), (i32 -1), SReg_64:$src0)
|
||||
>;
|
||||
|
||||
// 1. Offset as 8bit DWORD immediate
|
||||
def : Pat <
|
||||
(int_SI_load_const SReg_128:$sbase, IMM8bitDWORD:$offset),
|
||||
(S_BUFFER_LOAD_DWORD_IMM SReg_128:$sbase, IMM8bitDWORD:$offset)
|
||||
>;
|
||||
|
||||
// 2. Offset loaded in an 32bit SGPR
|
||||
def : Pat <
|
||||
(int_SI_load_const SReg_128:$sbase, imm:$offset),
|
||||
(S_BUFFER_LOAD_DWORD_SGPR SReg_128:$sbase, (S_MOV_B32 imm:$offset))
|
||||
>;
|
||||
|
||||
/********** ================== **********/
|
||||
/********** VOP3 Patterns **********/
|
||||
/********** ================== **********/
|
||||
|
@ -16,8 +16,7 @@ let TargetPrefix = "SI", isTarget = 1 in {
|
||||
|
||||
def int_SI_packf16 : Intrinsic <[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem]>;
|
||||
def int_SI_export : Intrinsic <[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], []>;
|
||||
/* XXX: We may need a seperate intrinsic here for loading integer values */
|
||||
def int_SI_load_const : Intrinsic <[llvm_float_ty], [llvm_i64_ty, llvm_i32_ty], []>;
|
||||
def int_SI_load_const : Intrinsic <[llvm_float_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrReadMem]>;
|
||||
def int_SI_vs_load_input : Intrinsic <[llvm_v4f32_ty], [llvm_v16i8_ty, llvm_i16_ty, llvm_i32_ty], [IntrReadMem]> ;
|
||||
def int_SI_wqm : Intrinsic <[], [], []>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user