Add end-to-end corpus from Tint SPIR-V Reader
Add the unit tests samples from src/reader/spirv when:
- they are valid for Vulkan 1.0 (plus some common extensions)
- they should translate to valid WGSL
Bug: tint:1043
Change-Id: I40a01990dbc40aff5cf7ace0b1aabfd0e437f638
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60000
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_Nest_Loop_Loop.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_Nest_Loop_Loop.spvasm
new file mode 100644
index 0000000..0acd695
--- /dev/null
+++ b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_Nest_Loop_Loop.spvasm
@@ -0,0 +1,62 @@
+; Test: SpvParserCFGTest_LabelControlFlowConstructs_Nest_Loop_Loop.spvasm
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos SPIR-V Tools Assembler; 0
+; Bound: 1000
+; Schema: 0
+OpCapability Shader
+OpMemoryModel Logical Simple
+OpEntryPoint Fragment %100 "main"
+OpExecutionMode %100 OriginUpperLeft
+OpName %var "var"
+%void = OpTypeVoid
+%3 = OpTypeFunction %void
+%bool = OpTypeBool
+%5 = OpConstantNull %bool
+%true = OpConstantTrue %bool
+%false = OpConstantFalse %bool
+%uint = OpTypeInt 32 0
+%int = OpTypeInt 32 1
+%uint_42 = OpConstant %uint 42
+%int_42 = OpConstant %int 42
+%13 = OpTypeFunction %uint
+%uint_0 = OpConstant %uint 0
+%uint_1 = OpConstant %uint 1
+%uint_2 = OpConstant %uint 2
+%uint_3 = OpConstant %uint 3
+%uint_4 = OpConstant %uint 4
+%uint_5 = OpConstant %uint 5
+%uint_6 = OpConstant %uint 6
+%uint_7 = OpConstant %uint 7
+%uint_8 = OpConstant %uint 8
+%uint_10 = OpConstant %uint 10
+%uint_20 = OpConstant %uint 20
+%uint_30 = OpConstant %uint 30
+%uint_40 = OpConstant %uint 40
+%uint_50 = OpConstant %uint 50
+%uint_90 = OpConstant %uint 90
+%uint_99 = OpConstant %uint 99
+%_ptr_Private_uint = OpTypePointer Private %uint
+%var = OpVariable %_ptr_Private_uint Private
+%uint_999 = OpConstant %uint 999
+%100 = OpFunction %void None %3
+%10 = OpLabel
+OpBranch %20
+%20 = OpLabel
+OpLoopMerge %89 %50 None
+OpBranchConditional %5 %30 %89
+%30 = OpLabel
+OpLoopMerge %40 %30 None
+OpBranchConditional %true %30 %40
+%40 = OpLabel
+OpBranch %50
+%50 = OpLabel
+OpBranch %60
+%60 = OpLabel
+OpBranch %20
+%89 = OpLabel
+OpBranch %99
+%99 = OpLabel
+OpReturn
+OpFunctionEnd
+