diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2015-01-20 17:49:45 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2015-01-20 17:49:45 +0000 |
commit | 8255af45cbfbfdeb29eb8c817e20cdbed45371cf (patch) | |
tree | e2cc8c4761702aebcd9287308ab467bcc8ddcc15 /llvm/test/CodeGen/R600/scratch-buffer.ll | |
parent | 805806952903902f01785e57a20a953a595cbeef (diff) | |
download | bcm5719-llvm-8255af45cbfbfdeb29eb8c817e20cdbed45371cf.tar.gz bcm5719-llvm-8255af45cbfbfdeb29eb8c817e20cdbed45371cf.zip |
R600/SI: Add kill flag when copying scratch offset to a register
This allows us to re-use the same register for the scratch offset
when accessing large private arrays.
llvm-svn: 226585
Diffstat (limited to 'llvm/test/CodeGen/R600/scratch-buffer.ll')
-rw-r--r-- | llvm/test/CodeGen/R600/scratch-buffer.ll | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/R600/scratch-buffer.ll b/llvm/test/CodeGen/R600/scratch-buffer.ll index cc2a522c9a8..740328a495d 100644 --- a/llvm/test/CodeGen/R600/scratch-buffer.ll +++ b/llvm/test/CodeGen/R600/scratch-buffer.ll @@ -3,9 +3,14 @@ ; When a frame index offset is more than 12-bits, make sure we don't store ; it in mubuf's offset field. +; Also, make sure we use the same register for storing the scratch buffer addresss +; for both stores. This register is allocated by the register scavenger, so we +; should be able to reuse the same regiser for each scratch buffer access. + ; CHECK-LABEL: {{^}}legal_offset_fi: -; CHECK: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], s{{[0-9]+}} offen -; CHECK: v_mov_b32_e32 [[OFFSET:v[0-9]+]], 0x8000 +; CHECK: v_mov_b32_e32 [[OFFSET:v[0-9]+]], 0{{$}} +; CHECK: buffer_store_dword v{{[0-9]+}}, [[OFFSET]], s[{{[0-9]+}}:{{[0-9]+}}], s{{[0-9]+}} offen +; CHECK: v_mov_b32_e32 [[OFFSET]], 0x8000 ; CHECK: buffer_store_dword v{{[0-9]+}}, [[OFFSET]], s[{{[0-9]+}}:{{[0-9]+}}], s{{[0-9]+}} offen{{$}} define void @legal_offset_fi(i32 addrspace(1)* %out, i32 %cond, i32 %if_offset, i32 %else_offset) { |