LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 877 - core dump by -condprop optimization pass
Summary: core dump by -condprop optimization pass
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Scalar Optimizations (show other bugs)
Version: 1.6
Hardware: All All
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2006-08-11 19:13 PDT by Patrick Jenkins
Modified: 2010-02-22 12:47 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Jenkins 2006-08-11 19:13:55 PDT
Running `opt bugpoint-reduced-condprop.8-11-2006.bc -condprop` produces the
following output: 
WARNING: You're attempting to print out a bytecode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bytecode first-hand, you
can force output with the `-f' option.

PHINode should have one entry for each predecessor of its parent basic block!
        %tmp.i119.lcssa35.lcssa.lcssa.lcssa.lcssa.lcssa = phi
"struct.kc::impl_elem_patternrepresentation"* [ null, %bb1077 ]           ;
<"struct.kc::impl_elem_patternrepresentation"*> [#uses=0]
Broken module found, compilation aborted!
Abort trap

The bytecode file can be found at: 
http://www.patjenk.com/llvm/bugpoint-reduced-condprop.8-11-2006.bc


This error first occurred on a dual g5 running a beta version of mac os 10.5 and
was reproduced on a g4 running mac os 10.4.6. I was using the latest llvm CVS on
both machines. 

The bug was exposed by running the following passes through bugpoint on kimwitu++: 
-simplifycfg -instcombine -loopsimplify -instcombine -inline -sccp -lowersetjmp
-reassociate -adce -scalarrepl -loop-unswitch -condprop -mergereturn
-raiseallocs -dse -instcombine -tailcallelim -funcresolve -lcssa -mem2reg
-constmerge -simplifycfg -condprop -prune-eh -simplifycfg -argpromotion -basiccg
-globalopt -simplifycfg -verify -licm -instcombine -raise -verify -simplifycfg
-deadtypeelim -gcse -basiccg -break-crit-edges -loop-unroll -tailduplicate
-ipconstprop -deadargelim -simplify-libcalls -globaldce -instcombine -load-vn
-break-crit-edges -indvars
Comment 1 Patrick Jenkins 2006-08-11 19:24:12 PDT
This bug was also found by bugpoint on another dual g5. The bytecode file it
produced is located at : 
http://www.patjenk.com/llvm/bugpoint-reduced-condprop.8-11-2006.2.bc

running `opt bugpoint-reduced-simplified.bc -condprop` produced:
PHINode should have one entry for each predecessor of its parent basic block!
        %iftmp.333.1.lcssa113 = phi uint [ 0, %bb1294 ]         ; <uint> [#uses=0]
Broken module found, compilation aborted!
Abort trap

The error was found by running the set of passes listed in the initial post
through bugpoint on kimwitu++. 

Comment 2 Chris Lattner 2006-08-14 16:40:09 PDT
Fixed.  Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036724.html

testcase here:
Transforms/CondProp/2006-08-14-SingleEntryPhiCrash.ll

Thanks!

-Chris