brintos

brintos / llvm-project-archived public Read only

0
0
Text · 738 B · 63b2604 Raw
20 lines · plain
1; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}3 4; CHECK-DAG: OpName %[[#Fun:]] "_Z3booi"5; CHECK-DAG: OpDecorate %[[#Param:]] FuncParamAttr Sret6; CHECK-DAG: %[[#PtrTy:]] = OpTypePointer Function %[[#StructTy:]]7; CHECK-DAG: %[[#StructTy]] = OpTypeStruct 8; CHECK: %[[#Fun]] = OpFunction %[[#]] 9; CHECK: %[[#Param]] = OpFunctionParameter %[[#PtrTy]] 10 11%struct.Example = type { }12 13define spir_func i32 @foo() {14  %1 = alloca %struct.Example, align 815  call void @_Z3booi(ptr sret(%struct.Example) align 8 %1, i32 noundef 42)16  ret i32 017}18 19declare void @_Z3booi(ptr sret(%struct.Example) align 8, i32 noundef)20