Skip to content

Regression in StructurizeCFG, r321751: complex loop structure turned into infinite loop #35363

@nhaehnle

Description

@nhaehnle
Bugzilla Link 36015
Resolution FIXED
Resolved on Jan 30, 2018 03:36
Version trunk
OS Linux
Blocks #35152
Attachments Reduced test case, Output of opt -structurizecfg
CC @zmodem,@arsenm

Extended Description

I'm attaching a reduced test case, plus the output of opt -structurizecfg.

Change r321751 ("StructurizeCFG: Fix broken backedge detection") breaks this test case, in the following way:

The original code has edges from both %if and %else into the %exit block. In the resulting code, the edge from %if to %exit disappears: if the exit condition is met (%cond.if = false), the control will follow %if -> %Flow1 -> %Flow2 -> %loop.outer instead of %if -> %Flow1 -> %Flow2 -> %exit.

This bug regresses various OpenGL test suites, for example dEQP-GLES3.functional.shaders.loops.do_while_dynamic_iterations.conditional_continue_vertex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions