First Last Prev Next    No search results available
Details
: [tailduplicate] DemoteRegToStack breaks SSA form
Bug#: 310
: libraries
: Transformation Utilities
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.2
: P2
: minor
: 1.3

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <clattner@apple.com>
Assigned To: Chris Lattner <clattner@apple.com>

Attachments


Note

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

Related actions


Description:   Opened: 2004-04-01 14:10
The verifier asserts after tail duplication on the following testcase:

void %interpret() {
entry:
        br label %retry

retry:
        %tmp.8 = call int %interp() 
        switch uint 0, label %endif.4 [
                 uint 4294967271, label %return
                 uint 4294967280, label %return
        ]

endif.4:
        br bool false, label %return, label %retry

return:
        %result.0 = phi int [ %tmp.8, %retry ], [ %tmp.8, %endif.4 ]
        ret void
}

declare int %interp()
------- Comment #1 From Chris Lattner 2004-04-01 14:16:57 -------
Err, here's the correct testcase:

void %interpret() {
entry:
        br label %retry

retry:
        %tmp.8 = call int %interp()
        switch uint 0, label %endif.4 [
                 uint 4294967271, label %return
                 uint 4294967280, label %return
        ]

endif.4:
        br bool false, label %return, label %retry

return:
        %result.0 = phi int [ %tmp.8, %retry ], [%tmp.8, %retry], [ %tmp.8,
%endif.4 ]
        ret void
}

declare int %interp()
------- Comment #2 From Chris Lattner 2004-04-01 14:30:36 -------
Fixed, here's the patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040329/013415.html

Testcase here: TailDup/2004-04-01-DemoteRegToStack.llx

I'm marking this as a low-priority bug because it never would have caused a
problem in gccas, it only crashed because I didn't run the mem2reg pass after
it.  It's still a bug, just not one that would realistically occur in the wild.

-Chris

First Last Prev Next    No search results available