| Issue |
165733
|
| Summary |
[WebAssembly] llc (assertion trunk) triggered assertion "LR.verify()" at -O1
|
| Labels |
backend:WebAssembly,
crash-on-valid
|
| Assignees |
|
| Reporter |
XChy
|
Reproducer: https://godbolt.org/z/hqEbqqfq4
Testcase (reduced from a valid C program):
```llvm
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20"
target triple = "wasm32-unknown-wasi"
define void @func_32(ptr %agg.result) {
entry:
%l_45 = alloca i32, align 4
%l_45.0.l_45.0.l_45.0.l_45.promoted = load i32, ptr %l_45, align 4
br label %BS_LABEL_1
BS_LABEL_1: ; preds = %BS_LABEL_1, %entry
%l_54.0 = phi ptr [ undef, %entry ], [ %agg.result, %BS_LABEL_1 ]
callbr void asm sideeffect "", "!i"()
to label %asm.fallthrough [label %BS_LABEL_1]
asm.fallthrough: ; preds = %BS_LABEL_1
store i32 %l_45.0.l_45.0.l_45.0.l_45.promoted, ptr null, align 4
store i32 0, ptr %l_54.0, align 4
ret void
}
```
llc (assertion trunk) output:
```
llc: /root/llvm-project/llvm/lib/CodeGen/LiveIntervals.cpp:1141: void llvm::LiveIntervals::HMEditor::updateRange(llvm::LiveRange&, llvm::VirtRegOrUnit, llvm::LaneBitmask): Assertion `LR.verify()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -O1 <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'WebAssembly Register Stackify' on function '@func_32'
#0 0x000000000419a438 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x419a438)
#1 0x00000000041972e4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007b5422642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007b54226969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007b5422642476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007b54226287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007b542262871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007b5422639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x0000000002fafbc1 llvm::LiveIntervals::HMEditor::updateRange(llvm::LiveRange&, llvm::VirtRegOrUnit, llvm::LaneBitmask) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fafbc1)
#9 0x0000000002faff4b llvm::LiveIntervals::HMEditor::updateAllRanges(llvm::MachineInstr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2faff4b)
#10 0x0000000002fb3b87 llvm::LiveIntervals::handleMove(llvm::MachineInstr&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fb3b87)
#11 0x00000000021bd1c1 (anonymous namespace)::WebAssemblyRegStackify::runOnMachineFunction(llvm::MachineFunction&) WebAssemblyRegStackify.cpp:0:0
#12 0x000000000307f7e9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#13 0x00000000036cda16 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x36cda16)
#14 0x00000000036cddc1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x36cddc1)
#15 0x00000000036ce62f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x36ce62f)
#16 0x00000000008f95d3 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#17 0x00000000007c6b56 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7c6b56)
#18 0x00007b5422629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#19 0x00007b5422629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#20 0x00000000008eea15 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8eea15)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs