Home | History | Annotate | Download | only in R600
      1 ;RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck %s
      2 
      3 ;CHECK-LABEL: @test1
      4 ;CHECK: TBUFFER_STORE_FORMAT_XYZW {{v\[[0-9]+:[0-9]+\]}}, 0x20, -1, 0, -1, 0, 14, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
      5 define void @test1(i32 %a1, i32 %vaddr) #0 {
      6     %vdata = insertelement <4 x i32> undef, i32 %a1, i32 0
      7     call void @llvm.SI.tbuffer.store.v4i32(<16 x i8> undef, <4 x i32> %vdata,
      8         i32 4, i32 %vaddr, i32 0, i32 32, i32 14, i32 4, i32 1, i32 0, i32 1,
      9         i32 1, i32 0)
     10     ret void
     11 }
     12 
     13 ;CHECK-LABEL: @test2
     14 ;CHECK: TBUFFER_STORE_FORMAT_XYZ {{v\[[0-9]+:[0-9]+\]}}, 0x18, -1, 0, -1, 0, 13, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
     15 define void @test2(i32 %a1, i32 %vaddr) #0 {
     16     %vdata = insertelement <4 x i32> undef, i32 %a1, i32 0
     17     call void @llvm.SI.tbuffer.store.v4i32(<16 x i8> undef, <4 x i32> %vdata,
     18         i32 3, i32 %vaddr, i32 0, i32 24, i32 13, i32 4, i32 1, i32 0, i32 1,
     19         i32 1, i32 0)
     20     ret void
     21 }
     22 
     23 ;CHECK-LABEL: @test3
     24 ;CHECK: TBUFFER_STORE_FORMAT_XY {{v\[[0-9]+:[0-9]+\]}}, 0x10, -1, 0, -1, 0, 11, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
     25 define void @test3(i32 %a1, i32 %vaddr) #0 {
     26     %vdata = insertelement <2 x i32> undef, i32 %a1, i32 0
     27     call void @llvm.SI.tbuffer.store.v2i32(<16 x i8> undef, <2 x i32> %vdata,
     28         i32 2, i32 %vaddr, i32 0, i32 16, i32 11, i32 4, i32 1, i32 0, i32 1,
     29         i32 1, i32 0)
     30     ret void
     31 }
     32 
     33 ;CHECK-LABEL: @test4
     34 ;CHECK: TBUFFER_STORE_FORMAT_X {{v[0-9]+}}, 0x8, -1, 0, -1, 0, 4, 4, {{v[0-9]+}}, {{s\[[0-9]+:[0-9]+\]}}, -1, 0, 0
     35 define void @test4(i32 %vdata, i32 %vaddr) #0 {
     36     call void @llvm.SI.tbuffer.store.i32(<16 x i8> undef, i32 %vdata,
     37         i32 1, i32 %vaddr, i32 0, i32 8, i32 4, i32 4, i32 1, i32 0, i32 1,
     38         i32 1, i32 0)
     39     ret void
     40 }
     41 
     42 declare void @llvm.SI.tbuffer.store.i32(<16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
     43 declare void @llvm.SI.tbuffer.store.v2i32(<16 x i8>, <2 x i32>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
     44 declare void @llvm.SI.tbuffer.store.v4i32(<16 x i8>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
     45 
     46 attributes #0 = { "ShaderType"="1" }
     47