Closed vchuravy closed 4 years ago
Pushed a fix in 7f3787c0f2746f7748d642ffc9ce699a295df9e4. Please verify and if it solves the problem, close the bug.
How did you get the mir file?
Allow me to give you some context. Julia compiles a huge set of functions
into a single shared-library that is loaded at startup and is called the system-image. Normally to reproduce these issues it is enough to dump the post-optimized LLVM IR and then run llc
over it. That method of reproduction failed and there most be a subtle difference how either the TargetMachine is configured or the pipeline is invoked.
So to produce the reproducer I manually extracted the MIR in GDB with:
`` b /home/vchuravy/julia/deps/srccache/llvm-10.0.0/lib/Target/PowerPC/PPCPreEmitPeephole.cpp:179
commands
call printMIR(dbgs(), MF) cont end
and then added the LLVM IR manually after stripping metadata.
I can give you the bitcode file that I thought should reproduce it with llc, but doesn't or I can try and dump the entire module with printMIR
before running PPCPreEmitPeephole.
Created attachment 23322 [details] Reprdocuer
Not yet fully minimal, but at least a standalone reproducer using MIR as an input: usr/tools/llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -run-pass ppc-pre-emit-peephole ~/func.mir
I had to strip the metadata since I couldn't cleanly exfiltrate that.
How did you get the mir file? I use below command to get the func.mir, but it's different from yours llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -stop-before=ppc-pre-emit-peephole -o stop-before.mir func.ll
If you can give me the func.ll and tell me the option to get the func.mir, I can narrow the case and it's convenient to find the bug.
Thanks. I can reproduce this error, I will investigate it.
Reprdocuer Not yet fully minimal, but at least a standalone reproducer using MIR as an input: usr/tools/llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -run-pass ppc-pre-emit-peephole ~/func.mir
I had to strip the metadata since I couldn't cleanly exfiltrate that.
Trying to do that it's a bit challenging since this is triggered from within Julia and my attempts at reproduction outside so far have failed.
@Valentin Churavy , could you give the error case and the command line you used? So someone can reproduce it easily.
Extended Description
Stacktrace:
This is the same configuration as llvm/llvm-project#44711