Fix SPIR-V code generation of dead return statements.
If we encounter code like `return 1; return 2;` we need to synthesize a
label, even though the second return statement isn't actually reachable.
This is harmless and satisfies the SPIR-V validator.
Ideally we'd eliminate the dead code entirely, but this case is rare and
isn't likely to cause any problems as-is.
Change-Id: I2d6219dff6868011353e19a662301bec44a015d6
Bug: skia:12009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409402
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni
index 83589d3..193bb6e 100644
--- a/gn/sksl_tests.gni
+++ b/gn/sksl_tests.gni
@@ -348,6 +348,7 @@
"/sksl/shared/DeadDoWhileLoop.sksl",
"/sksl/shared/DeadIfStatement.sksl",
"/sksl/shared/DeadLoopVariable.sksl",
+ "/sksl/shared/DeadReturn.sksl",
"/sksl/shared/DeadStripFunctions.sksl",
"/sksl/shared/DependentInitializers.sksl",
"/sksl/shared/DerivativesUnused.sksl",