-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-instcombine miscompilation of MiBench/consumer-typeset #1479
Comments
assigned to @lattner |
I reduced it with this command: bugpoint -llc-safe Output/consumer-typeset.noopt-llvm.bc Bugpoint gets confused because GCC ICEs on the CBE output (thus the -llc-safe mode). I gets it down to: opt bugpoint-tooptimize.bc -load-vn -gcse -instcombine -break-crit-edges I'll investigate. -Chris |
I really need to get bugpoint fixed on Linux. This is frustrating that I can't |
Yes, you do :) |
It took at lot of scrutinizing, but it looks like instcombine is miscompiling: define bool %test(i8 %A, i8 %B) { into: define bool %test(i8 %A, i8 %B) { |
Here is one instcombine bugfix: Testcase here: Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll This is not sufficient to fix consumer-typeset though. Rebugpointing. |
Here is one instcombine bugfix: Testcase here: Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll The next bug isn't in instcombine. Closing this bug to keep things simple. -Chris |
Works on Linux too. |
mentioned in issue llvm/llvm-bugzilla-archive#1940 |
Extended Description
I have been trying to solve a little mystery. After resolving various issues
with the test case itsellf (MultisSource/Benchmarks/MiBench/consumer-typeset), I
have determined that there is a codegen bug that this test triggers when
-instcombine is run. Here's how I know this:
If you run the Output/consumer-typeset.linked.rbc file through lli in JIT
mode it works fine.
All three backends (llc,jit,cbe) fail in the same way. They all produce the
same incorrect output. This indicates a misoptimization rather than a code
gen bug.
I used findmisopt to find the first optimization that caused the output to
differ. It reported this sequence of optimizations as the first set that
produces a difference in the output:
-lowersetjmp -funcresolve -raiseallocs -simplifycfg -mem2reg -globalopt
-globaldce -ipconstprop -deadargelim -instcombine
bugpoint produces a non-sensical reduction (two branches and a return)
I'm wondernig if someone can bugpoint this on Darwin because I'm starting to
think that bugpoint doesn't work so well on Linux. In the last month, a Darwin
run of bugpoint was able to reduce a test case that a run on Linux, with the
same inputs, could not reduce. If you can reduce this on Darwin, I'll file a bug
against bugpoint.
The text was updated successfully, but these errors were encountered: