1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
3 RWBuffer<float> Buffer;
6 void main(unsigned GI : SV_GroupIndex) {}
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()
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 @"?main@@YAXI@Z"(i32 %0)
16 //CHECK-NEXT: ret void