diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/CodeGen/R600/32-bit-local-address-space.ll | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/CodeGen/R600/32-bit-local-address-space.ll')
-rw-r--r-- | test/CodeGen/R600/32-bit-local-address-space.ll | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/test/CodeGen/R600/32-bit-local-address-space.ll b/test/CodeGen/R600/32-bit-local-address-space.ll index 7dec426..4ff2762 100644 --- a/test/CodeGen/R600/32-bit-local-address-space.ll +++ b/test/CodeGen/R600/32-bit-local-address-space.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck %s +; RUN: llc -march=r600 -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s ; On Southern Islands GPUs the local address space(3) uses 32-bit pointers and ; the global address space(1) uses 64-bit pointers. These tests check to make sure @@ -9,9 +9,9 @@ ; Instructions with B32, U32, and I32 in their name take 32-bit operands, while ; instructions with B64, U64, and I64 take 64-bit operands. -; CHECK-LABEL: @local_address_load -; CHECK: V_MOV_B32_e{{32|64}} [[PTR:v[0-9]]] -; CHECK: DS_READ_B32 v{{[0-9]+}}, [[PTR]] +; FUNC-LABEL: {{^}}local_address_load: +; SI: v_mov_b32_e{{32|64}} [[PTR:v[0-9]]] +; SI: ds_read_b32 v{{[0-9]+}}, [[PTR]] define void @local_address_load(i32 addrspace(1)* %out, i32 addrspace(3)* %in) { entry: %0 = load i32 addrspace(3)* %in @@ -19,10 +19,10 @@ entry: ret void } -; CHECK-LABEL: @local_address_gep -; CHECK: S_ADD_I32 [[SPTR:s[0-9]]] -; CHECK: V_MOV_B32_e32 [[VPTR:v[0-9]+]], [[SPTR]] -; CHECK: DS_READ_B32 [[VPTR]] +; FUNC-LABEL: {{^}}local_address_gep: +; SI: s_add_i32 [[SPTR:s[0-9]]] +; SI: v_mov_b32_e32 [[VPTR:v[0-9]+]], [[SPTR]] +; SI: ds_read_b32 [[VPTR]] define void @local_address_gep(i32 addrspace(1)* %out, i32 addrspace(3)* %in, i32 %offset) { entry: %0 = getelementptr i32 addrspace(3)* %in, i32 %offset @@ -31,9 +31,9 @@ entry: ret void } -; CHECK-LABEL: @local_address_gep_const_offset -; CHECK: V_MOV_B32_e32 [[VPTR:v[0-9]+]], s{{[0-9]+}} -; CHECK: DS_READ_B32 v{{[0-9]+}}, [[VPTR]], 0x4, +; FUNC-LABEL: {{^}}local_address_gep_const_offset: +; SI: v_mov_b32_e32 [[VPTR:v[0-9]+]], s{{[0-9]+}} +; SI: ds_read_b32 v{{[0-9]+}}, [[VPTR]] offset:4 define void @local_address_gep_const_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %in) { entry: %0 = getelementptr i32 addrspace(3)* %in, i32 1 @@ -43,10 +43,10 @@ entry: } ; Offset too large, can't fold into 16-bit immediate offset. -; CHECK-LABEL: @local_address_gep_large_const_offset -; CHECK: S_ADD_I32 [[SPTR:s[0-9]]], s{{[0-9]+}}, 0x10004 -; CHECK: V_MOV_B32_e32 [[VPTR:v[0-9]+]], [[SPTR]] -; CHECK: DS_READ_B32 [[VPTR]] +; FUNC-LABEL: {{^}}local_address_gep_large_const_offset: +; SI: s_add_i32 [[SPTR:s[0-9]]], s{{[0-9]+}}, 0x10004 +; SI: v_mov_b32_e32 [[VPTR:v[0-9]+]], [[SPTR]] +; SI: ds_read_b32 [[VPTR]] define void @local_address_gep_large_const_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %in) { entry: %0 = getelementptr i32 addrspace(3)* %in, i32 16385 @@ -55,10 +55,10 @@ entry: ret void } -; CHECK-LABEL: @null_32bit_lds_ptr: -; CHECK: V_CMP_NE_I32 -; CHECK-NOT: V_CMP_NE_I32 -; CHECK: V_CNDMASK_B32 +; FUNC-LABEL: {{^}}null_32bit_lds_ptr: +; SI: v_cmp_ne_i32 +; SI-NOT: v_cmp_ne_i32 +; SI: v_cndmask_b32 define void @null_32bit_lds_ptr(i32 addrspace(1)* %out, i32 addrspace(3)* %lds) nounwind { %cmp = icmp ne i32 addrspace(3)* %lds, null %x = select i1 %cmp, i32 123, i32 456 @@ -66,10 +66,10 @@ define void @null_32bit_lds_ptr(i32 addrspace(1)* %out, i32 addrspace(3)* %lds) ret void } -; CHECK-LABEL: @mul_32bit_ptr: -; CHECK: V_MUL_LO_I32 -; CHECK-NEXT: V_ADD_I32_e32 -; CHECK-NEXT: DS_READ_B32 +; FUNC-LABEL: {{^}}mul_32bit_ptr: +; SI: s_mul_i32 +; SI-NEXT: s_add_i32 +; SI: ds_read_b32 define void @mul_32bit_ptr(float addrspace(1)* %out, [3 x float] addrspace(3)* %lds, i32 %tid) { %ptr = getelementptr [3 x float] addrspace(3)* %lds, i32 %tid, i32 0 %val = load float addrspace(3)* %ptr @@ -77,11 +77,11 @@ define void @mul_32bit_ptr(float addrspace(1)* %out, [3 x float] addrspace(3)* % ret void } -@g_lds = addrspace(3) global float zeroinitializer, align 4 +@g_lds = addrspace(3) global float undef, align 4 -; CHECK-LABEL: @infer_ptr_alignment_global_offset: -; CHECK: V_MOV_B32_e32 [[REG:v[0-9]+]], 0 -; CHECK: DS_READ_B32 v{{[0-9]+}}, [[REG]] +; FUNC-LABEL: {{^}}infer_ptr_alignment_global_offset: +; SI: v_mov_b32_e32 [[REG:v[0-9]+]], 0 +; SI: ds_read_b32 v{{[0-9]+}}, [[REG]] define void @infer_ptr_alignment_global_offset(float addrspace(1)* %out, i32 %tid) { %val = load float addrspace(3)* @g_lds store float %val, float addrspace(1)* %out @@ -89,37 +89,37 @@ define void @infer_ptr_alignment_global_offset(float addrspace(1)* %out, i32 %ti } -@ptr = addrspace(3) global i32 addrspace(3)* null -@dst = addrspace(3) global [16384 x i32] zeroinitializer +@ptr = addrspace(3) global i32 addrspace(3)* undef +@dst = addrspace(3) global [16384 x i32] undef -; CHECK-LABEL: @global_ptr: -; CHECK: DS_WRITE_B32 +; FUNC-LABEL: {{^}}global_ptr: +; SI: ds_write_b32 define void @global_ptr() nounwind { store i32 addrspace(3)* getelementptr ([16384 x i32] addrspace(3)* @dst, i32 0, i32 16), i32 addrspace(3)* addrspace(3)* @ptr ret void } -; CHECK-LABEL: @local_address_store -; CHECK: DS_WRITE_B32 +; FUNC-LABEL: {{^}}local_address_store: +; SI: ds_write_b32 define void @local_address_store(i32 addrspace(3)* %out, i32 %val) { store i32 %val, i32 addrspace(3)* %out ret void } -; CHECK-LABEL: @local_address_gep_store -; CHECK: S_ADD_I32 [[SADDR:s[0-9]+]], -; CHECK: V_MOV_B32_e32 [[ADDR:v[0-9]+]], [[SADDR]] -; CHECK: DS_WRITE_B32 [[ADDR]], v{{[0-9]+}}, +; FUNC-LABEL: {{^}}local_address_gep_store: +; SI: s_add_i32 [[SADDR:s[0-9]+]], +; SI: v_mov_b32_e32 [[ADDR:v[0-9]+]], [[SADDR]] +; SI: ds_write_b32 [[ADDR]], v{{[0-9]+}} define void @local_address_gep_store(i32 addrspace(3)* %out, i32, i32 %val, i32 %offset) { %gep = getelementptr i32 addrspace(3)* %out, i32 %offset store i32 %val, i32 addrspace(3)* %gep, align 4 ret void } -; CHECK-LABEL: @local_address_gep_const_offset_store -; CHECK: V_MOV_B32_e32 [[VPTR:v[0-9]+]], s{{[0-9]+}} -; CHECK: V_MOV_B32_e32 [[VAL:v[0-9]+]], s{{[0-9]+}} -; CHECK: DS_WRITE_B32 [[VPTR]], [[VAL]], 0x4 +; FUNC-LABEL: {{^}}local_address_gep_const_offset_store: +; SI: v_mov_b32_e32 [[VPTR:v[0-9]+]], s{{[0-9]+}} +; SI: v_mov_b32_e32 [[VAL:v[0-9]+]], s{{[0-9]+}} +; SI: ds_write_b32 [[VPTR]], [[VAL]] offset:4 define void @local_address_gep_const_offset_store(i32 addrspace(3)* %out, i32 %val) { %gep = getelementptr i32 addrspace(3)* %out, i32 1 store i32 %val, i32 addrspace(3)* %gep, align 4 @@ -127,10 +127,10 @@ define void @local_address_gep_const_offset_store(i32 addrspace(3)* %out, i32 %v } ; Offset too large, can't fold into 16-bit immediate offset. -; CHECK-LABEL: @local_address_gep_large_const_offset_store -; CHECK: S_ADD_I32 [[SPTR:s[0-9]]], s{{[0-9]+}}, 0x10004 -; CHECK: V_MOV_B32_e32 [[VPTR:v[0-9]+]], [[SPTR]] -; CHECK: DS_WRITE_B32 [[VPTR]], v{{[0-9]+}}, 0 +; FUNC-LABEL: {{^}}local_address_gep_large_const_offset_store: +; SI: s_add_i32 [[SPTR:s[0-9]]], s{{[0-9]+}}, 0x10004 +; SI: v_mov_b32_e32 [[VPTR:v[0-9]+]], [[SPTR]] +; SI: ds_write_b32 [[VPTR]], v{{[0-9]+}} [M0]{{$}} define void @local_address_gep_large_const_offset_store(i32 addrspace(3)* %out, i32 %val) { %gep = getelementptr i32 addrspace(3)* %out, i32 16385 store i32 %val, i32 addrspace(3)* %gep, align 4 |