brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 5df23e9 Raw
35 lines · plain
1; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-vulkan1.3-unknown %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan1.3-unknown %s -o - -filetype=obj | spirv-val --target-env vulkan1.3 %}3 4; CHECK-DAG:        %[[#int:]] = OpTypeInt 32 05; CHECK-DAG:        %[[#ptr_Input_int:]] = OpTypePointer Input %[[#int]]6; CHECK-DAG:        %[[#LocalInvocationIndex:]] = OpVariable %[[#ptr_Input_int]] Input7 8; CHECK-DAG:        OpEntryPoint GLCompute {{.*}} %[[#LocalInvocationIndex]]9; CHECK-DAG:        OpName %[[#LocalInvocationIndex]] "__spirv_BuiltInLocalInvocationIndex"10; CHECK-DAG:        OpDecorate %[[#LocalInvocationIndex]] BuiltIn LocalInvocationIndex11 12target triple = "spirv-unknown-vulkan-library"13 14define internal void @local_index_user(i32) {15entry:16  ret void17}18 19; Function Attrs: convergent noinline norecurse20define void @main() #1 {21entry:22 23; CHECK:        %[[#load:]] = OpLoad %[[#int]] %[[#LocalInvocationIndex]]24  %1 = call i32 @llvm.spv.flattened.thread.id.in.group()25 26  call spir_func void @local_index_user(i32 %1)27  ret void28}29 30; Function Attrs: nounwind willreturn memory(none)31declare i32 @llvm.spv.flattened.thread.id.in.group() #332 33attributes #1 = { convergent noinline norecurse "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }34attributes #3 = { nounwind willreturn memory(none) }35