aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/R600/SIInstructions.td
diff options
context:
space:
mode:
authorChristian Konig <christian.koenig@amd.com>2013-03-18 11:33:55 +0000
committerChristian Konig <christian.koenig@amd.com>2013-03-18 11:33:55 +0000
commitb3affde9559061216b821316815b1b273b275f4c (patch)
tree2ec018a1fb493e13960e40cc622ac68d019255b7 /lib/Target/R600/SIInstructions.td
parent13e876b27b99826d4a5bb417337b9d2dd712d03f (diff)
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
Diffstat (limited to 'lib/Target/R600/SIInstructions.td')
-rw-r--r--lib/Target/R600/SIInstructions.td12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index e8247a8bdd..5e8ab0c5d2 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -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 **********/
/********** ================== **********/