[Mesa-dev] [PATCH 1/2] R600: Add support for i32 loads from the constant address space on Cayman

Tom Stellard tom at stellard.net
Tue Jun 18 09:54:16 PDT 2013


From: Tom Stellard <thomas.stellard at amd.com>

---
 lib/Target/R600/R600Instructions.td | 9 +++++++++
 test/CodeGen/R600/load.ll           | 1 +
 2 files changed, 10 insertions(+)

diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
index 83d735f..803f597 100644
--- a/lib/Target/R600/R600Instructions.td
+++ b/lib/Target/R600/R600Instructions.td
@@ -1755,6 +1755,15 @@ def VTX_READ_GLOBAL_128_cm : VTX_READ_128_cm <1,
   [(set v4i32:$dst_gpr, (global_load ADDRVTX_READ:$src_gpr))]
 >;
 
+//===----------------------------------------------------------------------===//
+// Constant Loads
+// XXX: We are currently storing all constants in the global address space.
+//===----------------------------------------------------------------------===//
+
+def CONSTANT_LOAD_cm : VTX_READ_32_cm <1,
+  [(set i32:$dst_gpr, (constant_load ADDRVTX_READ:$src_gpr))]
+>;
+
 } // End isCayman
 
 //===----------------------------------------------------------------------===//
diff --git a/test/CodeGen/R600/load.ll b/test/CodeGen/R600/load.ll
index ff774ec..d1ebaa3 100644
--- a/test/CodeGen/R600/load.ll
+++ b/test/CodeGen/R600/load.ll
@@ -1,4 +1,5 @@
 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600-CHECK %s
+; RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck --check-prefix=R600-CHECK %s
 ; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck --check-prefix=SI-CHECK  %s
 
 ; Load an i8 value from the global address space.
-- 
1.7.11.4



More information about the mesa-dev mailing list