| Issue |
171557
|
| Summary |
error: register `R0' modified more than once
|
| Labels |
backend:Hexagon,
crash-on-valid
|
| Assignees |
fhossein-quic
|
| Reporter |
androm3da
|
Linux kernel build of `kernel/rcu/tree.o` for hexagon fails with an assertion. Issue reported and bisected to #169559 by @nathanchance
Reduced test case `./169559_reduced.ll`:
```
target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
target triple = "hexagon-unknown-linux-musl"
define void @rcu_pending(i1 %tobool.not, ptr %jiffies) {
entry:
br i1 %tobool.not, label %land.end, label %land.rhs
land.rhs: ; preds = %entry
%0 = load volatile i32, ptr %jiffies, align 4
%1 = load volatile i32, ptr null, align 4
br label %land.end
land.end: ; preds = %land.rhs, %entry
ret void
}
```
Failure:
```
$ ./bin/llc -O2 ./169559_reduced.ll -filetype=obj
<unknown>:0: error: register `R0' modified more than once
llc: /home/brian/src/toolchain_for_hexagon/llvm-project/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp:74: virtual void llvm::HexagonMCELFStreamer::emitInstruction(const MCInst &, const MCSubtargetInfo &): Assertion `CheckOk' 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: ./bin/llc -O2 ./169559_reduced.ll -filetype=obj
1. Running pass 'Function Pass Manager' on module './169559_reduced.ll'.
2. Running pass 'Hexagon Assembly Printer' on function '@rcu_pending'
#0 0x000059f61c8b1158 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./bin/llc+0x2efd158)
#1 0x000059f61c8ae8e5 llvm::sys::RunSignalHandlers() (./bin/llc+0x2efa8e5)
#2 0x000059f61c8b1dc1 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x000077ec82242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000077ec822969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x000077ec822969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x000077ec822969fc pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x000077ec82242476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#8 0x000077ec822287f3 abort ./stdlib/abort.c:81:7
#9 0x000077ec8222871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x000077ec82239e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x000059f61b2a4313 (./bin/llc+0x18f0313)
#12 0x000059f61b0c25d7 llvm::HexagonAsmPrinter::emitInstruction(llvm::MachineInstr const*) HexagonAsmPrinter.cpp:0:0
#13 0x000059f61b52a2e4 llvm::AsmPrinter::emitFunctionBody() (./bin/llc+0x1b762e4)
#14 0x000059f61b0c2ad0 llvm::HexagonAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) HexagonAsmPrinter.cpp:0:0
#15 0x000059f61b8020f3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (./bin/llc+0x1e4e0f3)
#16 0x000059f61be0ceb8 llvm::FPPassManager::runOnFunction(llvm::Function&) (./bin/llc+0x2458eb8)
#17 0x000059f61be146d2 llvm::FPPassManager::runOnModule(llvm::Module&) (./bin/llc+0x24606d2)
#18 0x000059f61be0d98e llvm::legacy::PassManagerImpl::run(llvm::Module&) (./bin/llc+0x245998e)
#19 0x000059f61b09f640 compileModule(char**, llvm::LLVMContext&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) llc.cpp:0:0
#20 0x000059f61b09cda0 main (./bin/llc+0x16e8da0)
#21 0x000077ec82229d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#22 0x000077ec82229e40 call_init ./csu/../csu/libc-start.c:128:20
#23 0x000077ec82229e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#24 0x000059f61b098a25 _start (./bin/llc+0x16e4a25)
Aborted
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs