1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
3 %aggregate = type { i8, i32 }
5 define %aggregate @getConstant() {
6 ret %aggregate { i8 1, i32 2 }
9 ; CHECK: OpName [[GET:%.+]] "getConstant"
11 ; CHECK-DAG: [[I8:%.+]] = OpTypeInt 8
12 ; CHECK-DAG: [[I32:%.+]] = OpTypeInt 32
13 ; CHECK-DAG: [[AGGREGATE:%.+]] = OpTypeStruct [[I8]] [[I32]]
14 ; CHECK-DAG: [[CST_I8:%.+]] = OpConstant [[I8]] 1
15 ; CHECK-DAG: [[CST_I32:%.+]] = OpConstant [[I32]] 2
16 ; CHECK-DAG: [[CST_AGGREGATE:%.+]] = OpConstantComposite [[AGGREGATE]] [[CST_I8]] [[CST_I32]]
18 ; CHECK: [[GET]] = OpFunction [[AGGREGATE]]
19 ; CHECK: OpReturnValue [[CST_AGGREGATE]]
20 ; CHECK: OpFunctionEnd