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

Aaron Watry awatry at gmail.com
Mon Jun 24 18:21:25 PDT 2013


Tested-By: Aaron Watry <awatry at gmail.com>

Tested on an A6-3500 (SUMO)

On Tue, Jun 18, 2013 at 11:54 AM, Tom Stellard <tom at stellard.net> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the llvm-commits mailing list