| Issue |
171879
|
| Summary |
[llvm][PowerPC] `Assertion 'VT.getSizeInBits() == N1.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed.`
|
| Labels |
backend:PowerPC,
crash-on-valid
|
| Assignees |
|
| Reporter |
alexrp
|
```llvm
target datalayout = "e-m:e-Fn32-i64:64-i128:128-n32:64-S128-v256:256:256-v512:512:512"
target triple = "powerpc64le-unknown-linux5.10.0-musl"
define fastcc <16 x i16> @crypto.Certificate.rsa.PKCS1v1_5Signature.verify__anon_1281860(<16 x i1> %0) #0 {
Entry:
%1 = bitcast <16 x i1> %0 to i16
%2 = insertelement <16 x i16> zeroinitializer, i16 %1, i64 0
ret <16 x i16> %2
}
attributes #0 = { "target-cpu"="pwr10" }
```
```
❯ llc --version | head -n2
LLVM (http://llvm.org/):
LLVM version 21.1.8
❯ llc -O3 reduced.ll
llc: /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6564: llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags): Assertion `VT.getSizeInBits() == N1.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llc -O3 reduced.ll
1. Running pass 'Function Pass Manager' on module 'reduced.ll'.
2. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@crypto.Certificate.rsa.PKCS1v1_5Signature.verify__anon_1281860'
#0 0x000070b2893b456d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/alexrp/Sources/llvm/llvm/lib/Support/Unix/Signals.inc:838:3
#1 0x000070b2893b16a4 llvm::sys::RunSignalHandlers() /home/alexrp/Sources/llvm/llvm/lib/Support/Signals.cpp:104:20
#2 0x000070b2893b1ebc SignalHandler(int, siginfo_t*, void*) /home/alexrp/Sources/llvm/llvm/lib/Support/Unix/Signals.inc:426:14
#3 0x000070b287c45f60 (/lib/x86_64-linux-gnu/libc.so.6+0x45f60)
#4 0x000070b287ca5fed __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x000070b287ca5fed __pthread_kill_internal ./nptl/pthread_kill.c:89:10
#6 0x000070b287ca5fed pthread_kill ./nptl/pthread_kill.c:100:10
#7 0x000070b287c45e2e raise ./signal/../sysdeps/posix/raise.c:27:6
#8 0x000070b287c28888 internal_signal_block_all ./stdlib/../sysdeps/unix/sysv/linux/internal-signals.h:81:3
#9 0x000070b287c28888 __abort_lock_wrlock ./stdlib/abort.c:62:3
#10 0x000070b287c28888 abort ./stdlib/abort.c:85:3
#11 0x000070b287c287f0 __assert_perror_fail ./assert/assert-perr.c:31:1
#12 0x000070b288d4e3a1 llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags) (.cold) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6406:5
#13 0x000070b289dd8452 (anonymous namespace)::SelectionDAGLegalize::PromoteNode(llvm::SDNode*) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:5538:10
#14 0x000070b289de4828 llvm::SelectionDAG::Legalize() /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:6120:28
#15 0x000070b289fc035b llvm::TimeRegion::~TimeRegion() /home/alexrp/Sources/llvm/llvm/include/llvm/Support/Timer.h:162:9
#16 0x000070b289fc035b llvm::NamedRegionTimer::~NamedRegionTimer() /home/alexrp/Sources/llvm/llvm/include/llvm/Support/Timer.h:170:8
#17 0x000070b289fc035b llvm::SelectionDAGISel::CodeGenAndEmitDAG() /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1068:3
#18 0x000070b289fc3bb8 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1891:33
#19 0x000070b289fc53fc llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:605:22
#20 0x000070b28d2c03fc (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/alexrp/Sources/llvm/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:172:5
#21 0x000070b289fbcd81 llvm::OptLevelChanger::~OptLevelChanger() /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:267:11
#22 0x000070b289fbcd81 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:373:1
#23 0x000070b289fbcd81 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:345:6
#24 0x000070b2898fe32a llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) /home/alexrp/Sources/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:108:30
#25 0x000070b289571faa llvm::FPPassManager::runOnFunction(llvm::Function&) /home/alexrp/Sources/llvm/llvm/lib/IR/LegacyPassManager.cpp:1398:40
#26 0x000070b2895721b5 llvm::ilist_detail::node_base_prevnext<llvm::ilist_node_base<true, void>, true>::getNext() const /home/alexrp/Sources/llvm/llvm/include/llvm/ADT/ilist_node_base.h:42:38
#27 0x000070b2895721b5 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, true, false, void, false, void>>::getNext() /home/alexrp/Sources/llvm/llvm/include/llvm/ADT/ilist_node.h:119:66
#28 0x000070b2895721b5 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, true, false, void, false, void>, false, false>::operator++() /home/alexrp/Sources/llvm/llvm/include/llvm/ADT/ilist_iterator.h:187:25
#29 0x000070b2895721b5 llvm::FPPassManager::runOnModule(llvm::Module&) /home/alexrp/Sources/llvm/llvm/lib/IR/LegacyPassManager.cpp:1443:22
#30 0x000070b289572a4f runOnModule /home/alexrp/Sources/llvm/llvm/lib/IR/LegacyPassManager.cpp:1513:38
#31 0x000070b289572a4f llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/alexrp/Sources/llvm/llvm/lib/IR/LegacyPassManager.cpp:531:55
#32 0x0000615181f0f1b9 compileModule(char**, llvm::LLVMContext&) /home/alexrp/Sources/llvm/llvm/tools/llc/llc.cpp:761:34
#33 0x0000615181f03707 main /home/alexrp/Sources/llvm/llvm/tools/llc/llc.cpp:404:35
#34 0x000070b287c2a575 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#35 0x000070b287c2a628 call_init ./csu/../csu/libc-start.c:128:20
#36 0x000070b287c2a628 __libc_start_main ./csu/../csu/libc-start.c:347:5
#37 0x0000615181f04cf5 _start (/opt/llvm-21/bin/llc+0x14cf5)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs