[LLVMbugs] [Bug 4254] New: ocaml 3.11.0 miscompiled, bugpoint says -instcombine is to blame
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat May 23 08:19:10 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4254
Summary: ocaml 3.11.0 miscompiled, bugpoint says -instcombine is
to blame
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=3021)
--> (http://llvm.org/bugs/attachment.cgi?id=3021)
bugpoint-tooptimize.bc
Symptom: the ocamlrun build by clang -O rejects pervasives.mli with a syntax
error, the gcc built one doesn't, and neither does a 'clang' built ocamlrun:
File "../stdlib/pervasives.mli", line 29, characters 0-8:
Error: Syntax error
I've run bugpoint like this:
bugpoint -run-jit -safe-run-llc -output=good -simplifycfg -domtree
-domfrontier -mem2reg -instcombine -simplifycfg -simplify-libcalls -instcombine
-jump-threading -simplifycfg -domtree -domfrontier -scalarrepl -instcombine
-break-crit-edges -condprop -tailcallelim -simplifycfg -reassociate -domtree
-loops -loopsimplify -domfrontier -lcssa -loop-rotate -licm -lcssa
-loop-unswitch -loop-index-split -instcombine -scalar-evolution -lcssa
-iv-users -indvars -loop-deletion -instcombine -memdep -gvn -memdep -memcpyopt
-sccp -instcombine -break-crit-edges -condprop -domtree -memdep -dse -adce
-simplifycfg -preverify -domtree -verify ocamlrun.bc -Xlinker=-lm
-Xlinker=-lpthread -Xlinker=-ldl -Xlinker=-lcurses --args -- ../boot/ocamlc -g
-warn-error A -nostdlib-nopervasives -c ../stdlib/pervasives.mli
And I got 2 bitcodes: bugpoint-tooptimize.bc, and bugpoint-tonotoptimize.bc.
Bugpoint says -instcombine breaks the program.
Here is what instcombine does:
- %tmp128 = load i8** @intern_src ; <i8*> [#uses=1]
- %arrayidx129 = getelementptr i8* %tmp128, i64 -2 ; <i8*>
[#uses=1]
- %tmp130 = load i8* %arrayidx129 ; <i8> [#uses=1]
- %conv131 = zext i8 %tmp130 to i32 ; <i32> [#uses=1]
- %conv132 = sext i32 %conv131 to i64 ; <i64> [#uses=1]
- %shl133 = shl i64 %conv132, 56 ; <i64> [#uses=1]
- %shr134 = ashr i64 %shl133, 56 ; <i64> [#uses=1]
- %shl135 = shl i64 %shr134, 8 ; <i64> [#uses=1]
- %tmp136 = load i8** @intern_src ; <i8*> [#uses=1]
- %arrayidx137 = getelementptr i8* %tmp136, i64 -1 ; <i8*>
[#uses=1]
+ %tmp130 = load i8* %tmp126 ; <i8> [#uses=1]
+ %conv1322 = zext i8 %tmp130 to i64 ; <i64> [#uses=1]
+ %shl133 = shl i64 %conv1322, 56 ; <i64> [#uses=1]
+ %0 = ashr i64 %shl133, 48 ; <i64> [#uses=1]
+ %arrayidx137 = getelementptr i8* %tmp126, i64 1 ; <i8*>
[#uses=1]
%tmp138 = load i8* %arrayidx137 ; <i8> [#uses=1]
%conv139 = zext i8 %tmp138 to i64 ; <i64> [#uses=1]
- %add140 = add i64 %shl135, %conv139 ; <i64> [#uses=1]
+ %add140 = or i64 %0, %conv139 ; <i64> [#uses=1]
%shl141 = shl i64 %add140, 1 ; <i64> [#uses=1]
- %add142 = add i64 %shl141, 1 ; <i64> [#uses=1]
- store i64 %add142, i64* %v
+ %add1421 = or i64 %shl141, 1 ; <i64> [#uses=1]
+ store i64 %add1421, i64* %v
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list