Skip to content

spirv-fuzz: Invalidation when adding dead block #3690

@andreperezmaselco

Description

@andreperezmaselco

spirv-val invalidated a fuzzed shader because a selection header does not dominates its merge block. According to SPIR-V specification, each header block must strictly dominate its merge block, unless the merge block is unreachable in the CFG.

error: line 172: The selection construct with the selection header 487[%487] does not dominate the merge block 59[%59]
  %59 = OpLabel

Debugging spirv-fuzz, I found that TransformationAddDeadBlock::IsApplicable does not check if existing_block strictly dominate successor_block_id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions