| 1 |
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s |
| 2 |
|
| 3 |
RWBuffer<float> Buffer; |
| 4 |
|
| 5 |
[numthreads(1,1,1)] |
| 6 |
void main(unsigned GI : SV_GroupIndex) {} |
| 7 |
|
| 8 |
// Make sure global variable for ctors/dtors removed. |
| 9 |
// CHECK-NOT:@llvm.global_ctors |
| 10 |
// CHECK-NOT:@llvm.global_dtors |
| 11 |
//CHECK: define void @main() |
| 12 |
//CHECK-NEXT: entry: |
| 13 |
//CHECK-NEXT: call void @_GLOBAL__sub_I_GlobalConstructors.hlsl() |
| 14 |
//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() |
| 15 |
//CHECK-NEXT: call void @_Z4mainj(i32 %0) |
| 16 |
//CHECK-NEXT: ret void |