1 ; RUN: %if directx-registered-target %{ opt -S -dxil-metadata-emit < %s | FileCheck %s --check-prefix=DXIL-CHECK %}
2 ; RUN: %if spirv-registered-target %{ llc %s -mtriple=spirv-unknown-unknown -o - | FileCheck %s --check-prefix=SPIRV-CHECK %}
4 target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
5 target triple = "dxil-unknown-shadermodel6.7-compute"
7 ;DXIL-CHECK:!dx.entryPoints = !{![[entry:[0-9]+]]}
9 ;DXIL-CHECK:![[entry]] = !{ptr @entry, !"entry", null, null, ![[extra:[0-9]+]]}
10 ;DXIL-CHECK:![[extra]] = !{i32 4, ![[numthreads:[0-9]+]]}
11 ;DXIL-CHECK:![[numthreads]] = !{i32 1, i32 2, i32 1}
13 ;SPIRV-CHECK: OpCapability Shader
14 ;SPIRV-CHECK: OpMemoryModel Logical GLSL450
15 ;SPIRV-CHECK: OpEntryPoint GLCompute [[main:%[0-9]+]] "entry"
16 ;SPIRV-CHECK: OpExecutionMode [[main]] LocalSize 1 2 1
17 ;SPIRV-CHECK: [[void:%[0-9]+]] = OpTypeVoid
18 ;SPIRV-CHECK: [[ftype:%[0-9]+]] = OpTypeFunction [[void]]
19 ;SPIRV-CHECK: [[main]] = OpFunction [[void]] DontInline [[ftype]]
21 ; Function Attrs: noinline nounwind
22 define void @entry() #0 {
27 attributes #0 = { noinline nounwind "hlsl.numthreads"="1,2,1" "hlsl.shader"="compute" }