From: Tom Stellard Date: Tue, 25 Jun 2013 02:39:30 +0000 (+0000) Subject: R600: Add support for i32 loads from the constant address space on Cayman X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d67d029b6d2d9cc4274ffea5cc5c4bd120fe3425;p=oota-llvm.git R600: Add support for i32 loads from the constant address space on Cayman Tested-By: Aaron Watry git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184821 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td index a468ab74f3a..3c83905ab16 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 ff774ec922d..d1ebaa39f6a 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.