dawn-cmake/test/tint/bug/tint/1369.wgsl.expected.spvasm
Ben Clayton 8e3485248e tint/writer/spirv: Inline constant expressions
This is required to handle materialized values, and for constant
expressions.

Bug: tint:1504
Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-06-01 15:57:22 +00:00

55 lines
1.8 KiB
Plaintext

bug/tint/1369.wgsl:3:3 warning: code is unreachable
return true;
^^^^^^
bug/tint/1369.wgsl:9:9 warning: code is unreachable
var also_unreachable : bool;
^^^^^^^^^^^^^^^^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 22
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %f "f"
OpExecutionMode %f OriginUpperLeft
OpName %tint_discard "tint_discard"
OpName %call_discard "call_discard"
OpName %tint_discard_func "tint_discard_func"
OpName %f "f"
OpName %v "v"
%bool = OpTypeBool
%2 = OpConstantNull %bool
%_ptr_Private_bool = OpTypePointer Private %bool
%tint_discard = OpVariable %_ptr_Private_bool Private %2
%5 = OpTypeFunction %bool
%true = OpConstantTrue %bool
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_bool = OpTypePointer Function %bool
%call_discard = OpFunction %bool None %5
%7 = OpLabel
OpStore %tint_discard %true
OpReturnValue %2
OpFunctionEnd
%tint_discard_func = OpFunction %void None %9
%12 = OpLabel
OpKill
OpFunctionEnd
%f = OpFunction %void None %9
%14 = OpLabel
%v = OpVariable %_ptr_Function_bool Function %2
%15 = OpFunctionCall %bool %call_discard
OpStore %v %15
%18 = OpLoad %bool %tint_discard
OpSelectionMerge %19 None
OpBranchConditional %18 %20 %19
%20 = OpLabel
%21 = OpFunctionCall %void %tint_discard_func
OpReturn
%19 = OpLabel
OpReturn
OpFunctionEnd