Bugzilla – Bug 310
[tailduplicate] DemoteRegToStack breaks SSA form
Last modified: 2004-04-01 14:30:36
You need to log in before you can comment on or make changes to this bug.
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()
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()
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