26 lines · plain
1; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s2 3;; Debug info:4; CHECK: OpName %[[#FOO:]] "foo"5 6;; Types:7; CHECK: %[[#VOID:]] = OpTypeVoid8; CHECK: %[[#FN:]] = OpTypeFunction %[[#VOID]]9 10;; Functions:11; CHECK: %[[#FOO]] = OpFunction %[[#VOID]] None %[[#FN]]12; CHECK-NOT: OpFunctionParameter13;; NOTE: In 2.4, it isn't explicitly written that a function always has a least14;; one block. In fact, 2.4.11 seems to imply that there are at least two15;; blocks in functions with a body, but that doesn't make much sense.16;; However, in order to distinguish between function declaration and17;; definition, a function needs at least one block, hence why this test18;; expects one OpLabel + OpReturn.19; CHECK: OpLabel20; CHECK: OpReturn21; CHECK-NOT: OpLabel22; CHECK: OpFunctionEnd23define void @foo() {24 ret void25}26