1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
3 ; CHECK-DAG: [[I32:%.+]] = OpTypeInt 32
4 ; CHECK-DAG: [[BOOL:%.+]] = OpTypeBool
5 ; CHECK-DAG: [[TRUE:%.+]] = OpConstantTrue
6 ; CHECK-DAG: [[FALSE:%.+]] = OpConstantFalse
8 define i1 @test_if(i32 %a, i32 %b) {
10 %cond = icmp eq i32 %a, %b
11 br i1 %cond, label %true_label, label %false_label
19 ; CHECK: [[A:%.+]] = OpFunctionParameter [[I32]]
20 ; CHECK: [[B:%.+]] = OpFunctionParameter [[I32]]
21 ; CHECK: [[ENTRY:%.+]] = OpLabel
22 ; CHECK: [[COND:%.+]] = OpIEqual [[BOOL]] [[A]] [[B]]
23 ; CHECK: OpBranchConditional [[COND]] [[TRUE_LABEL:%.+]] [[FALSE_LABEL:%.+]]
24 ; CHECK: [[TRUE_LABEL]] = OpLabel
25 ; CHECK: OpReturnValue [[TRUE]]
26 ; CHECK: [[FALSE_LABEL]] = OpLabel
27 ; CHECK: OpReturnValue [[FALSE]]