From abcc20748c93aee8d41dce805ab289db1862d665 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 31 Aug 2018 04:25:59 -0300 Subject: [PATCH] Test branches --- tests/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/main.cpp b/tests/main.cpp index dfecb76..4261ab3 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -51,9 +51,15 @@ public: Constant(TypeFloat(32), Literal(50.0f))}); ConstantNull(TypeVector(TypeInt(64, false), 4)); + auto skip{Label()}; + auto end{Label()}; auto main_type{TypeFunction(TypeVoid())}; auto main_func{Emit(Function(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type))}; Emit(Label()); + Emit(BranchConditional(ConstantTrue(TypeBool()), skip, end, 5, 0)); + Emit(skip); + Emit(Branch(end)); + Emit(end); Emit(Return()); Emit(FunctionEnd());