Issue 87358
Summary LLVM ERROR: Broken module found, compilation aborted (Instruction does not dominate all uses)
Labels new issue
Assignees
Reporter TatyanaDoubts
    The following test fails when run with -passes slp-vectorizer -slp-threshold=-99999
```
; ModuleID = './reduced.ll'
source_filename = "./reduced.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

define void @wombat(i32 %arg) #0 gc "statepoint-example" {
bb:
  br label %bb2

bb1: ; No predecessors!
  br label %bb2

bb2:                                              ; preds = %bb1, %bb
  %phi = phi i32 [ %arg, %bb1 ], [ 0, %bb ]
  %phi3 = phi i32 [ 0, %bb1 ], [ 0, %bb ]
  %phi4 = phi i32 [ 0, %bb1 ], [ 0, %bb ]
  %phi5 = phi i32 [ %arg, %bb1 ], [ 0, %bb ]
  %phi6 = phi float [ 0.000000e+00, %bb1 ], [ 0.000000e+00, %bb ]
  %phi7 = phi i32 [ 0, %bb1 ], [ 0, %bb ]
  %phi8 = phi float [ 0.000000e+00, %bb1 ], [ 0.000000e+00, %bb ]
 %phi9 = phi i32 [ 0, %bb1 ], [ 0, %bb ]
  %icmp = icmp ult i32 %phi7, %phi
  ret void
}
```
Stack dump:
```
Instruction does not dominate all uses!
  %6 = extractelement <2 x i32> %2, i32 1
  %5 = insertelement <2 x i32> %4, i32 %6, i32 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 slp-vectorizer -slp-threshold=-99999 <source>
 #0 0x0000000004cf0f88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4cf0f88)
 #1 0x0000000004cee6dc SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f69db642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f69db6969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007f69db642476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007f69db6287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00000000007a61b7 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
 #7 0x0000000004c28148 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4c28148)
 #8 0x0000000004b3c193 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b3c193)
 #9 0x00000000008bc4ce llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8bc4ce)
#10 0x0000000004b0059c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b0059c)
#11 0x00000000008c6f82 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8c6f82)
#12 0x00000000008ba7d5 optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8ba7d5)
#13 0x00007f69db629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x00007f69db629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x00000000008b157e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8b157e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
Reproducer: https://godbolt.org/z/Y7ccvE7hs

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to