brintos

brintos / llvm-project-archived public Read only

0
0
Text · 938 B · d3e2b6b Raw
29 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; CHECK:      OpName %[[#BAR:]] "bar"6 7;; Types:8; CHECK-DAG:  %[[#I32:]] = OpTypeInt 329; CHECK-DAG:  %[[#VOID:]] = OpTypeVoid10; CHECK-DAG:  %[[#FNVOID:]] = OpTypeFunction %[[#VOID]] %[[#I32]]11; CHECK-DAG:  %[[#FNI32:]] = OpTypeFunction %[[#I32]] %[[#I32]]12;; Function decl:13; CHECK:      %[[#BAR]] = OpFunction %[[#I32]] None %[[#FNI32]]14; CHECK-NEXT: OpFunctionParameter %[[#I32]]15; CHECK-NEXT: OpFunctionEnd16declare i32 @bar(i32 %x)17;; Function def:18; CHECK:      %[[#FOO]] = OpFunction %[[#VOID]] None %[[#FNVOID]]19; CHECK:      OpFunctionParameter20; CHECK:      OpLabel21; CHECK:      OpFunctionCall %[[#I32]] %[[#BAR]]22; CHECK:      OpReturn23; CHECK-NOT:  OpLabel24; CHECK:      OpFunctionEnd25define spir_func void @foo(i32 %x) {26  %call1 = call spir_func i32 @bar(i32 %x)27  ret void28}29