[LLVMbugs] [Bug 932] NEW: Break Critical Edges pass doesn't update dominators right in some cases

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Oct 2 21:38:23 PDT 2006


http://llvm.org/bugs/show_bug.cgi?id=932

           Summary: Break Critical Edges pass doesn't update dominators
                    right in some cases
           Product: libraries
           Version: 1.8
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Transformation Utilities
        AssignedTo: sabre at nondot.org
        ReportedBy: sabre at nondot.org


Nick Lewycky reported that dominators we're getting updated for this .ll file correctly:

declare void %use1(int)

void %f(int %i, bool %c) {
entry:
  %A = seteq int %i, 0
  br bool %A, label %brtrue, label %brfalse

brtrue:
  %B = phi bool [ true, %brtrue ], [ false, %entry ]
  call void %use1(int %i)
  br bool %B, label %brtrue, label %brfalse

brfalse:
  call void %use1(int %i)
  ret void
}


Correct is:

Inorder Dominator Tree:
  [1]  %entry
    [2]  %entry.brfalse_crit_edge
    [2]  %entry.brtrue_crit_edge
      [3]  %brtrue
        [4]  %brtrue.brfalse_crit_edge
        [4]  %brtrue.brtrue_crit_edge
    [2]  %brfalse

Computed is:

Inorder Dominator Tree:
  [1]  %entry
    [2]  %brtrue
      [3]  %brtrue.brtrue_crit_edge
      [3]  %brtrue.brfalse_crit_edge
    [2]  %brfalse
    [2]  %entry.brtrue_crit_edge
    [2]  %entry.brfalse_crit_edge

BCE assumes that the broken edge block can never dominate anything, which is incorrect in this case.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list