| 1 |
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s |
| 2 |
; 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 Sret |
| 6 |
; 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 |
|
| 13 |
define spir_func i32 @foo() { |
| 14 |
%1 = alloca %struct.Example, align 8 |
| 15 |
call void @_Z3booi(ptr sret(%struct.Example) align 8 %1, i32 noundef 42) |
| 16 |
ret i32 0 |
| 17 |
} |
| 18 |
|
| 19 |
declare void @_Z3booi(ptr sret(%struct.Example) align 8, i32 noundef) |