2013-10-10 17:11:46 +00:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck %s
|
2013-09-12 02:55:14 +00:00
|
|
|
|
2014-01-11 21:06:00 +00:00
|
|
|
;CHECK-LABEL: @test1
|
2013-11-12 02:35:51 +00:00
|
|
|
;CHECK: TBUFFER_STORE_FORMAT_XYZW {{v\[[0-9]+:[0-9]+\]}}, 32, -1, 0, -1, 0, 14, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
|
2014-02-13 23:34:07 +00:00
|
|
|
define void @test1(i32 %a1, i32 %vaddr) #0 {
|
2013-09-12 02:55:14 +00:00
|
|
|
%vdata = insertelement <4 x i32> undef, i32 %a1, i32 0
|
|
|
|
call void @llvm.SI.tbuffer.store.v4i32(<16 x i8> undef, <4 x i32> %vdata,
|
|
|
|
i32 4, i32 %vaddr, i32 0, i32 32, i32 14, i32 4, i32 1, i32 0, i32 1,
|
|
|
|
i32 1, i32 0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-01-11 21:06:00 +00:00
|
|
|
;CHECK-LABEL: @test2
|
2013-11-12 02:35:51 +00:00
|
|
|
;CHECK: TBUFFER_STORE_FORMAT_XYZ {{v\[[0-9]+:[0-9]+\]}}, 24, -1, 0, -1, 0, 13, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
|
2014-02-13 23:34:07 +00:00
|
|
|
define void @test2(i32 %a1, i32 %vaddr) #0 {
|
2013-09-12 02:55:14 +00:00
|
|
|
%vdata = insertelement <4 x i32> undef, i32 %a1, i32 0
|
|
|
|
call void @llvm.SI.tbuffer.store.v4i32(<16 x i8> undef, <4 x i32> %vdata,
|
|
|
|
i32 3, i32 %vaddr, i32 0, i32 24, i32 13, i32 4, i32 1, i32 0, i32 1,
|
|
|
|
i32 1, i32 0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-01-11 21:06:00 +00:00
|
|
|
;CHECK-LABEL: @test3
|
2013-11-12 02:35:51 +00:00
|
|
|
;CHECK: TBUFFER_STORE_FORMAT_XY {{v\[[0-9]+:[0-9]+\]}}, 16, -1, 0, -1, 0, 11, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
|
2014-02-13 23:34:07 +00:00
|
|
|
define void @test3(i32 %a1, i32 %vaddr) #0 {
|
2013-09-12 02:55:14 +00:00
|
|
|
%vdata = insertelement <2 x i32> undef, i32 %a1, i32 0
|
|
|
|
call void @llvm.SI.tbuffer.store.v2i32(<16 x i8> undef, <2 x i32> %vdata,
|
|
|
|
i32 2, i32 %vaddr, i32 0, i32 16, i32 11, i32 4, i32 1, i32 0, i32 1,
|
|
|
|
i32 1, i32 0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-01-11 21:06:00 +00:00
|
|
|
;CHECK-LABEL: @test4
|
2013-11-12 02:35:51 +00:00
|
|
|
;CHECK: TBUFFER_STORE_FORMAT_X {{v[0-9]+}}, 8, -1, 0, -1, 0, 4, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
|
2014-02-13 23:34:07 +00:00
|
|
|
define void @test4(i32 %vdata, i32 %vaddr) #0 {
|
2013-09-12 02:55:14 +00:00
|
|
|
call void @llvm.SI.tbuffer.store.i32(<16 x i8> undef, i32 %vdata,
|
|
|
|
i32 1, i32 %vaddr, i32 0, i32 8, i32 4, i32 4, i32 1, i32 0, i32 1,
|
|
|
|
i32 1, i32 0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.SI.tbuffer.store.i32(<16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
|
|
|
|
declare void @llvm.SI.tbuffer.store.v2i32(<16 x i8>, <2 x i32>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
|
|
|
|
declare void @llvm.SI.tbuffer.store.v4i32(<16 x i8>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
|
2014-02-13 23:34:07 +00:00
|
|
|
|
|
|
|
attributes #0 = { "ShaderType"="1" }
|