Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / CodeGenHLSL / builtins / AppendStructuredBuffer-elementtype.hlsl
blob85face8eaeb6c8a0e6c6555e15d1b137b73fdffd
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s -check-prefixes=DXIL\r
2 \r
3 struct MyStruct {\r
4   float4 a;\r
5   int2 b;\r
6 };\r
7 \r
8 // DXIL: %"class.hlsl::AppendStructuredBuffer" = type { target("dx.RawBuffer", i16, 1, 0)\r
9 // DXIL: %"class.hlsl::AppendStructuredBuffer.0" = type { target("dx.RawBuffer", i16, 1, 0)\r
10 // DXIL: %"class.hlsl::AppendStructuredBuffer.1" = type { target("dx.RawBuffer", i32, 1, 0)\r
11 // DXIL: %"class.hlsl::AppendStructuredBuffer.2" = type { target("dx.RawBuffer", i32, 1, 0)\r
12 // DXIL: %"class.hlsl::AppendStructuredBuffer.3" = type { target("dx.RawBuffer", i64, 1, 0)\r
13 // DXIL: %"class.hlsl::AppendStructuredBuffer.4" = type { target("dx.RawBuffer", i64, 1, 0)\r
14 // DXIL: %"class.hlsl::AppendStructuredBuffer.5" = type { target("dx.RawBuffer", half, 1, 0) \r
15 // DXIL: %"class.hlsl::AppendStructuredBuffer.6" = type { target("dx.RawBuffer", float, 1, 0)\r
16 // DXIL: %"class.hlsl::AppendStructuredBuffer.7" = type { target("dx.RawBuffer", double, 1, 0)\r
17 // DXIL: %"class.hlsl::AppendStructuredBuffer.8" = type { target("dx.RawBuffer", <4 x i16>, 1, 0)\r
18 // DXIL: %"class.hlsl::AppendStructuredBuffer.9" = type { target("dx.RawBuffer", <3 x i32>, 1, 0)\r
19 // DXIL: %"class.hlsl::AppendStructuredBuffer.10" = type { target("dx.RawBuffer", <2 x half>, 1, 0)\r
20 // DXIL: %"class.hlsl::AppendStructuredBuffer.11" = type { target("dx.RawBuffer", <3 x float>, 1, 0)\r
21 // DXIL: %"class.hlsl::AppendStructuredBuffer.12" = type { target("dx.RawBuffer", %struct.MyStruct, 1, 0)\r
22 // DXIL: %struct.MyStruct = type { <4 x float>, <2 x i32>, [8 x i8] }\r
24 AppendStructuredBuffer<int16_t> BufI16;\r
25 AppendStructuredBuffer<uint16_t> BufU16;\r
26 AppendStructuredBuffer<int> BufI32;\r
27 AppendStructuredBuffer<uint> BufU32;\r
28 AppendStructuredBuffer<int64_t> BufI64;\r
29 AppendStructuredBuffer<uint64_t> BufU64;\r
30 AppendStructuredBuffer<half> BufF16;\r
31 AppendStructuredBuffer<float> BufF32;\r
32 AppendStructuredBuffer<double> BufF64;\r
33 AppendStructuredBuffer< vector<int16_t, 4> > BufI16x4;\r
34 AppendStructuredBuffer< vector<uint, 3> > BufU32x3;\r
35 AppendStructuredBuffer<half2> BufF16x2;\r
36 AppendStructuredBuffer<float3> BufF32x3;\r
37 // TODO: AppendStructuredBuffer<snorm half> BufSNormF16;\r
38 // TODO: AppendStructuredBuffer<unorm half> BufUNormF16;\r
39 // TODO: AppendStructuredBuffer<snorm float> BufSNormF32;\r
40 // TODO: AppendStructuredBuffer<unorm float> BufUNormF32;\r
41 // TODO: AppendStructuredBuffer<snorm double> BufSNormF64;\r
42 // TODO: AppendStructuredBuffer<unorm double> BufUNormF64;\r
43 AppendStructuredBuffer<MyStruct> BufMyStruct;\r
45 [numthreads(1,1,1)]\r
46 void main(int GI : SV_GroupIndex) {\r
47 }\r