Issue |
65225
|
Summary |
opt -O1: Instruction does not dominate all uses!
|
Labels |
llvm:crash,
llvm:optimizations
|
Assignees |
|
Reporter |
chfast
|
```llvm
define i32 @f(ptr %G.9, i64 %0) {
%A = alloca i1, align 1
%G = getelementptr i64, ptr %A, i64 -1
%u = load i8, ptr %G, align 1
%v = alloca i8, align 4
%x = load i1, ptr %v, align 4
%y = getelementptr double, ptr %G, i64 %0
store i1 %x, ptr %A, align 1
store i8 %u, ptr %G.9, align 1
store i1 false, ptr %y, align 1
ret i32 0
}
```
https://godbolt.org/z/vPoGh3YET
```
Instruction does not dominate all uses!
%v = alloca i8, align 4
%G = getelementptr i64, ptr %v, i64 -1
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes=default<O1> <source>
#0 0x00000000034b5ac8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x34b5ac8)
#1 0x00000000034b31fc SignalHandler(int) Signals.cpp:0:0
#2 0x00007fad50536420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007fad4fff900b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007fad4ffd8859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x0000000000784487 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x784487)
#6 0x0000000003405ee8 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3405ee8)
#7 0x0000000002e4add3 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2e4add3)
#8 0x000000000087c49e llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x87c49e)
#9 0x0000000002e108fc llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2e108fc)
#10 0x000000000088648a llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x88648a)
#11 0x000000000078f761 main (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x78f761)
#12 0x00007fad4ffda083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#13 0x000000000087b80e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x87b80e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
This is a test case reduced with `llvm-reduce`. However, I don't know how to reduce this to single pass.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs