R600: Add support for i32 loads from the constant address space on Cayman
authorTom Stellard <thomas.stellard@amd.com>
Tue, 25 Jun 2013 02:39:30 +0000 (02:39 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 25 Jun 2013 02:39:30 +0000 (02:39 +0000)
Tested-By: Aaron Watry <awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184821 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/R600Instructions.td
test/CodeGen/R600/load.ll

index a468ab74f3af19d88a278591b0e0c305ef993abd..3c83905ab163e4a27dc09078fdaecf14a46ef822 100644 (file)
@@ -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
 
 //===----------------------------------------------------------------------===//
index ff774ec922dbab8f5414be971b00c9a606ebc121..d1ebaa39f6a0fb1ae1e3de5b006c2a651e1d32a4 100644 (file)
@@ -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.