-
Notifications
You must be signed in to change notification settings - Fork 664
spirv-val: Checks for OpPhi do not check for duplicate predecessors #3918
Copy link
Copy link
Closed
Labels
Description
I found that this SPIR-V is accepted by the validator - note the OpPhis at the end, which have multiple entries for %8 but are missing entries for %9.
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main"
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 320
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeBool
%30 = OpTypeVector %6 3
%31 = OpTypeVector %6 2
%32 = OpTypeVector %6 4
%7 = OpConstantTrue %6
%10 = OpTypeInt 32 1
%11 = OpTypeVector %10 3
%40 = OpTypeFloat 32
%41 = OpTypeVector %40 4
%12 = OpUndef %11
%60 = OpUndef %41
%61 = OpConstantComposite %31 %7 %7
%4 = OpFunction %2 None %3
%5 = OpLabel
OpSelectionMerge %20 None
OpBranchConditional %7 %8 %9
%8 = OpLabel
OpBranch %20
%9 = OpLabel
OpBranch %20
%20 = OpLabel
%21 = OpPhi %11 %12 %8 %12 %8
%22 = OpPhi %11 %12 %8 %12 %8
%23 = OpPhi %41 %60 %8 %60 %8
%24 = OpPhi %31 %61 %8 %61 %8
%25 = OpPhi %41 %60 %8 %60 %8
OpReturn
OpFunctionEnd
Reactions are currently unavailable