[spirv-reader] Add cases for mergeless OpSwitch
This is a bit pathological.
Bug: tint:3
Change-Id: I448796c712049f88cef9a592c218d94a0daddb75
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22760
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/src/reader/spirv/function_cfg_test.cc b/src/reader/spirv/function_cfg_test.cc
index 0d192c5..c2887dc 100644
--- a/src/reader/spirv/function_cfg_test.cc
+++ b/src/reader/spirv/function_cfg_test.cc
@@ -8794,6 +8794,28 @@
)")) << ToString(fe.ast_body());
}
+// For normal terminator that is OpBranchConditional, the kBack, kForward,
+// kIfBreak are all invalid proven in earlier tests.
+TEST_F(SpvParserTest, DISABLED_EmitBody_BranchConditional_Fallthrough_Fallthrough_Same) {
+ // Can only be to the same target.
+ // TODO(dneto): needs switch support
+}
+TEST_F(SpvParserTest,
+ DISABLED_EmitBody_BranchConditional_Fallthrough_Fallthrough_Different_IsError) {
+ // TODO(dneto): needs switch support
+}
+TEST_F(SpvParserTest, DISABLED_EmitBody_BranchConditional_Fallthrough_LoopBreak) {
+ // TODO(dneto): needs switch support
+}
+TEST_F(SpvParserTest, DISABLED_EmitBody_BranchConditional_Fallthrough_SwitchBreak) {
+ // TODO(dneto): needs switch support
+}
+TEST_F(SpvParserTest, DISABLED_EmitBody_BranchConditional_Fallthrough_LoopContinue) {
+ // TODO(dneto): needs switch support
+}
+
+// TODO(dneto): test normal OpBranchConditional with other than Fallthrough
+
TEST_F(SpvParserTest,
DISABLED_Switch_NotAsSelectionHeader_NonDefaultBranchesAreContinue) {
// Adapted from SPIRV-Tools test MissingMergeOneUnseenTargetSwitchGood