diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-11-13 23:36:50 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-11-13 23:36:50 +0000 |
commit | a2b4eb6d15a13de257319ac6231b5ab622cd02b1 (patch) | |
tree | 3147a7994db9c80cbaa22526fae0dbfdc780c212 /test/CodeGen/R600 | |
parent | b52bf6a3b31596a309f4b12884522e9b4a344654 (diff) | |
download | external_llvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.zip external_llvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.tar.gz external_llvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.tar.bz2 |
R600/SI: Add support for private address space load/store
Private address space is emulated using the register file with
MOVRELS and MOVRELD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600')
-rw-r--r-- | test/CodeGen/R600/load.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/R600/private-memory.ll (renamed from test/CodeGen/R600/indirect-addressing.ll) | 37 | ||||
-rw-r--r-- | test/CodeGen/R600/sra.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/R600/unaligned-load-store.ll | 6 |
4 files changed, 27 insertions, 20 deletions
diff --git a/test/CodeGen/R600/load.ll b/test/CodeGen/R600/load.ll index 632509c..e4492d7 100644 --- a/test/CodeGen/R600/load.ll +++ b/test/CodeGen/R600/load.ll @@ -299,8 +299,6 @@ entry: ; R600-CHECK: 31 ; SI-CHECK-LABEL: @load_i64_sext ; SI-CHECK: BUFFER_LOAD_DWORDX2 [[VAL:v\[[0-9]:[0-9]\]]] -; SI-CHECK: V_LSHL_B64 [[LSHL:v\[[0-9]:[0-9]\]]], [[VAL]], 32 -; SI-CHECK: V_ASHR_I64 v{{\[[0-9]:[0-9]\]}}, [[LSHL]], 32 define void @load_i64_sext(i64 addrspace(1)* %out, i32 addrspace(1)* %in) { entry: diff --git a/test/CodeGen/R600/indirect-addressing.ll b/test/CodeGen/R600/private-memory.ll index 1ef6c35..48a013c 100644 --- a/test/CodeGen/R600/indirect-addressing.ll +++ b/test/CodeGen/R600/private-memory.ll @@ -1,16 +1,24 @@ -; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s +; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=R600-CHECK +; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=SI-CHECK ; This test checks that uses and defs of the AR register happen in the same ; instruction clause. -; CHECK: @mova_same_clause -; CHECK: MOVA_INT -; CHECK-NOT: ALU clause -; CHECK: 0 + AR.x -; CHECK: MOVA_INT -; CHECK-NOT: ALU clause -; CHECK: 0 + AR.x +; R600-CHECK-LABEL: @mova_same_clause +; R600-CHECK: MOVA_INT +; R600-CHECK-NOT: ALU clause +; R600-CHECK: 0 + AR.x +; R600-CHECK: MOVA_INT +; R600-CHECK-NOT: ALU clause +; R600-CHECK: 0 + AR.x +; SI-CHECK-LABEL: @mova_same_clause +; SI-CHECK: V_READFIRSTLANE +; SI-CHECK: V_MOVRELD +; SI-CHECK: S_CBRANCH +; SI-CHECK: V_READFIRSTLANE +; SI-CHECK: V_MOVRELD +; SI-CHECK: S_CBRANCH define void @mova_same_clause(i32 addrspace(1)* nocapture %out, i32 addrspace(1)* nocapture %in) { entry: %stack = alloca [5 x i32], align 4 @@ -38,9 +46,10 @@ entry: ; XXX: This generated code has unnecessary MOVs, we should be able to optimize ; this. -; CHECK: @multiple_structs -; CHECK-NOT: MOVA_INT - +; R600-CHECK-LABEL: @multiple_structs +; R600-CHECK-NOT: MOVA_INT +; SI-CHECK-LABEL: @multiple_structs +; SI-CHECK-NOT: V_MOVREL %struct.point = type { i32, i32 } define void @multiple_structs(i32 addrspace(1)* %out) { @@ -68,8 +77,10 @@ entry: ; loads and stores should be lowered to copies, so there shouldn't be any ; MOVA instructions. -; CHECK: @direct_loop -; CHECK-NOT: MOVA_INT +; R600-CHECK-LABLE: @direct_loop +; R600-CHECK-NOT: MOVA_INT +; SI-CHECK-LABEL: @direct_loop +; SI-CHECK-NOT: V_MOVREL define void @direct_loop(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { entry: diff --git a/test/CodeGen/R600/sra.ll b/test/CodeGen/R600/sra.ll index 2926163..fe9df10 100644 --- a/test/CodeGen/R600/sra.ll +++ b/test/CodeGen/R600/sra.ll @@ -43,7 +43,7 @@ define void @ashr_v4i32(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %i ;EG-CHECK: ASHR ;SI-CHECK-LABEL: @ashr_i64 -;SI-CHECK: V_ASHR_I64 +;SI-CHECK: S_ASHR_I64 s[{{[0-9]}}:{{[0-9]}}], s[{{[0-9]}}:{{[0-9]}}], 8 define void @ashr_i64(i64 addrspace(1)* %out, i32 %in) { entry: %0 = sext i32 %in to i64 diff --git a/test/CodeGen/R600/unaligned-load-store.ll b/test/CodeGen/R600/unaligned-load-store.ll index 3d192d9..2824ff8 100644 --- a/test/CodeGen/R600/unaligned-load-store.ll +++ b/test/CodeGen/R600/unaligned-load-store.ll @@ -1,8 +1,7 @@ ; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI %s ; SI-LABEL: @unaligned_load_store_i32: -; SI: V_ADD_I32_e64 [[REG:v[0-9]+]] -; DS_READ_U8 {{v[0-9]+}}, 0, [[REG]] +; DS_READ_U32 {{v[0-9]+}}, 0, [[REG]] define void @unaligned_load_store_i32(i32 addrspace(3)* %p, i32 addrspace(3)* %r) nounwind { %v = load i32 addrspace(3)* %p, align 1 store i32 %v, i32 addrspace(3)* %r, align 1 @@ -10,8 +9,7 @@ define void @unaligned_load_store_i32(i32 addrspace(3)* %p, i32 addrspace(3)* %r } ; SI-LABEL: @unaligned_load_store_v4i32: -; SI: V_ADD_I32_e64 [[REG:v[0-9]+]] -; DS_READ_U8 {{v[0-9]+}}, 0, [[REG]] +; DS_READ_U32 {{v[0-9]+}}, 0, [[REG]] define void @unaligned_load_store_v4i32(<4 x i32> addrspace(3)* %p, <4 x i32> addrspace(3)* %r) nounwind { %v = load <4 x i32> addrspace(3)* %p, align 1 store <4 x i32> %v, <4 x i32> addrspace(3)* %r, align 1 |