First Last Prev Next    No search results available
Details
: [loopsimplify] Loopsimplify incorrectly updates dominator...
Bug#: 223
: libraries
: Scalar Optimizations
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.2

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-02-05 00:05
I have not looked at this at all, but here's a testcase reduced by bugpoint. 
This comes from 176.gcc:

----
implementation   ; Functions:

void %.subst_48() {
entry:
        br bool false, label %loopentry.0, label %UnifiedReturnBlock

loopentry.0:            ; preds = %entry, %loopentry.0
        br bool false, label %loopentry.0, label %loopentry.2

loopentry.2:            ; preds = %loopentry.0, %loopentry.2
        %tmp.968 = setle int 0, 3               ; <bool> [#uses=1]
        br bool %tmp.968, label %loopentry.2, label %UnifiedReturnBlock

UnifiedReturnBlock:             ; preds = %entry, %loopentry.2
        ret void
}
----

$ opt -licm bugpoint-reduced-simplified.bc 
Instruction does not dominate all uses!
        %tmp.968 = setle int 0, 3               ; <bool> [#uses=1]
        br bool %tmp.968, label %loopentry.2, label %UnifiedReturnBlock.loopexit
Broken module found, compilation aborted!
Abort

-Chris
------- Comment #1 From Chris Lattner 2004-02-05 12:16:13 -------
As it turns out, the problem is that loop simplify is munging the dominator
information instead of updating it correctly to reflect the change it makes.

The transformation performed by LICM is correct, it's just that the verifier is
using the bogus dominator information to perform its checks.

-Chris
------- Comment #2 From Chris Lattner 2004-02-05 15:15:02 -------
Fixed.  Testcase here: LoopSimplify/2004-02-05-DominatorInfoCorruption.ll

Patch here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040202/011175.html

-Chris

First Last Prev Next    No search results available