<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/70208>70208</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Crash in PowerPC codegen caused by 4742715eb7fbd90b2d7ca807980bdca7e552fcd2
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:PowerPC,
regression
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
RKSimon
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tstellar
</td>
</tr>
</table>
<pre>
4742715eb7fbd90b2d7ca807980bdca7e552fcd2 introduced a regression in the PowerPC backend. To reproduce, run:
`llc -O2 opencv-reduced.ll.txt -o /dev/null`
[opencv-reduced.ll.txt](https://github.com/llvm/llvm-project/files/13166493/opencv-reduced.ll.txt)
Backtrace:
```
WidenVectorOperand op #0: t52: v2i64 = zero_extend_vector_inreg t50
Do not know how to widen this operator's operand!
UNREACHABLE executed at /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5937!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llvm-build/bin/llc -O2 opencv-reduced.ll -o /dev/null
1. Running pass 'Function Pass Manager' on module 'opencv-reduced.ll'.
2. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@widget'
#0 0x00007f01c2e882c1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/fedora/llvm-project/llvm/lib/Support/Unix/Signals.inc:606:3
#1 0x00007f01c2e8624b llvm::sys::RunSignalHandlers() /home/fedora/llvm-project/llvm/lib/Support/Signals.cpp:104:20
#2 0x00007f01c2e863a6 SignalHandler(int) /home/fedora/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
#3 0x00007f01c205fb20 __restore_rt (/lib64/libc.so.6+0x3cb20)
#4 0x00007f01c20afe8c __pthread_kill_implementation (/lib64/libc.so.6+0x8ce8c)
#5 0x00007f01c205fa76 gsignal (/lib64/libc.so.6+0x3ca76)
#6 0x00007f01c20497fc abort (/lib64/libc.so.6+0x267fc)
#7 0x00007f01c2dc85ba (/home/fedora/llvm-project/llvm-build/bin/../lib/libLLVM-17git.so+0x7c85ba)
#8 0x00007f01c386764c llvm::DAGTypeLegalizer::WidenVectorOperand(llvm::SDNode*, unsigned int) /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5937:5
#9 0x00007f01c3819596 llvm::DAGTypeLegalizer::run() /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:350:17
#10 0x00007f01c381a406 llvm::SelectionDAG::LegalizeTypes() /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1059:10
#11 0x00007f01c3973d69 llvm::TimeRegion::~TimeRegion() /home/fedora/llvm-project/llvm/include/llvm/Support/Timer.h:155:9
#12 0x00007f01c3973d69 llvm::NamedRegionTimer::~NamedRegionTimer() /home/fedora/llvm-project/llvm/include/llvm/Support/Timer.h:163:8
#13 0x00007f01c3973d69 llvm::SelectionDAGISel::CodeGenAndEmitDAG() /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:808:3
#14 0x00007f01c3977f97 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1705:33
#15 0x00007f01c3979d43 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) /home/fedora/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:483:22
#16 0x00007f01c57fa7f7 (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/fedora/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:174:5
#17 0x00007f01c334544e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) /home/fedora/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:91:33
#18 0x00007f01c300a265 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/fedora/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1445:7
#19 0x00007f01c300a451 llvm::ilist_node_base<true>::getNext() const /home/fedora/llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:43:45
#20 0x00007f01c300a451 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, true, false, void>>::getNext() /home/fedora/llvm-project/llvm/include/llvm/ADT/ilist_node.h:67:66
#21 0x00007f01c300a451 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, true, false, void>, false, false>::operator++() /home/fedora/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:157:25
#22 0x00007f01c300a451 llvm::FPPassManager::runOnModule(llvm::Module&) /home/fedora/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1480:22
#23 0x00007f01c300ace4 runOnModule /home/fedora/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1557:7
#24 0x00007f01c300ace4 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/fedora/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:535:55
#25 0x0000000000414fc5 compileModule(char**, llvm::LLVMContext&) /home/fedora/llvm-project/llvm/tools/llc/llc.cpp:759:66
#26 0x000000000040a4b7 main /home/fedora/llvm-project/llvm/tools/llc/llc.cpp:420:35
#27 0x00007f01c204a510 __libc_start_call_main (/lib64/libc.so.6+0x27510)
#28 0x00007f01c204a5c9 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x275c9)
#29 0x000000000040ae25 _start (llvm-build/bin/llc+0x40ae25)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8WVtz2yrX_jXkhokGATpd-MKx4-zOl7aZJHt_lx4E2OaNDB5AOeyL97e_A5Ijy0mbpm2aydgyltZ6nnViscycU2st5QRkZwDj6_-7UVujAcYgm5-w1m-MnXj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