In general, bugs/crashes should be reported to our GitHub issue tracker Issues · llvm/llvm-project with the traceback and source.
You can narrow down whether the crash is from an IR optimization by using the opt tool to compile out.ll; if that doesn’t crash, try llc which is the codegen/backend tool. Assuming this is an assertion, it should report the source location where the assertion failed, and you can poke around in the source to see what assumption wasn’t satisfied.
You could also try using bugpoint to reduce the test case.
Can you post the out.ll file?
Also, please clarify, what crashes.
The compiler
The program that has been compiled.
If the answer is (2), then what might be happening is that the program has some undefined outcomes, that the compiler optimizes out, thus causing the crash in the program. I.e. there might be a bug in the program that only shows itself when compiled with optimization turned on.
llvm-as-15 x.ll -o x.bc
llvm-as-15: assembly parsed, but does not verify as correct!
Instruction does not dominate all uses!
%17 = getelementptr inbounds double, double* %0, i64 %16
%92 = ptrtoint double* %17 to i64
Instruction does not dominate all uses!
%22 = getelementptr inbounds double, double* %2, i64 %16
%143 = ptrtoint double* %22 to i64