xref: /llvm-project/llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll (revision 67d3ef74b31e1517d4f679e754cc2b3041c95901)
1*67d3ef74SVyacheslav Levytskyy; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
2b8e1544bSIlia Diachkov
3b8e1544bSIlia Diachkovdefine i1 @getConstantTrue() {
4b8e1544bSIlia Diachkov  ret i1 true
5b8e1544bSIlia Diachkov}
6b8e1544bSIlia Diachkov
7b8e1544bSIlia Diachkovdefine i1 @getConstantFalse() {
8b8e1544bSIlia Diachkov  ret i1 false
9b8e1544bSIlia Diachkov}
10b8e1544bSIlia Diachkov
11b8e1544bSIlia Diachkov; CHECK:     [[BOOL:%.+]] = OpTypeBool
12b8e1544bSIlia Diachkov; CHECK-DAG: [[FN:%.+]] = OpTypeFunction [[BOOL]]
13b8e1544bSIlia Diachkov; CHECK-DAG: [[TRUE:%.+]] = OpConstantTrue
14b8e1544bSIlia Diachkov; CHECK-DAG: [[FALSE:%.+]] = OpConstantFalse
15b8e1544bSIlia Diachkov
16b8e1544bSIlia Diachkov; CHECK:     OpFunction [[BOOL]] None [[FN]]
17b8e1544bSIlia Diachkov; CHECK:     OpFunction [[BOOL]] None [[FN]]
18