Open justusranvier opened 1 year ago
@llvm/issue-subscribers-backend-powerpc
This regressed between llvmorg-17-init-16183-g
7b31a73ffe8 and llvmorg-17-init-16203-g
a4521c25ae5; the most likely candidates are llvmorg-17-init-16187-g
003b58f65bdd ("IR: Add llvm.frexp intrinsic") or llvmorg-17-init-16188-g
85bdea023f51 ("clang: Use new frexp intrinsic for builtins and add f16 version"), both by @arsenm, due to the error I see here:
#### 2023-09-29T08:48:36: Testing with last version llvmorg-17-init-16203-ga4521c25ae5
ExpandFloatResult #0: t5: ppcf128,i32 = ffrexp t4
Do not know how to expand the result of this operator!
UNREACHABLE executed at /home/dim/src/llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:1231!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang -cc1 -triple powerpc64le-unknown-linux-gnu -S -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu ppc64le -mfloat-abi hard -target-abi elfv2 -Og -W -Wall -Wextra -std=c++20 -fdeprecated-macro -fwrapv -stack-protector 2 -fstack-clash-protection -fno-signed-char -fno-char8_t -fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions Qt-618e32.ii
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'Qt-618e32.cpp'.
4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@_ZNKSt8__format14__formatter_fpIcE6formatIgNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_'
#0 0x0000000004351dc7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x4351dc7)
#1 0x000000000434fba8 llvm::sys::RunSignalHandlers() (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x434fba8)
#2 0x00000000043525a0 SignalHandler(int) Signals.cpp:0:0
#3 0x0000000829546a3e handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
#4 0x0000000829545ff9 thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
#5 0x00000008288ab903 ([vdso]+0x2d3)
#6 0x000000082de1697a __sys_thr_kill /usr/obj/usr/src/lib/libc/thr_kill.S:4:0
#7 0x000000082dd8f954 __raise /usr/src/lib/libc/gen/raise.c:0:10
#8 0x000000082de403e9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
#9 0x00000000042c9c51 (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x42c9c51)
#10 0x000000000541c7e4 (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x541c7e4)
#11 0x00000000053a326e llvm::DAGTypeLegalizer::run() LegalizeTypes.cpp:0:0
#12 0x00000000053a8360 llvm::SelectionDAG::LegalizeTypes() (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x53a8360)
#13 0x000000000536b130 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x536b130)
#14 0x0000000005369d59 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x5369d59)
#15 0x0000000005366c3d llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x5366c3d)
#16 0x0000000002f98b43 (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) PPCISelDAGToDAG.cpp:0:0
#17 0x00000000038b5059 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x38b5059)
#18 0x0000000003e487d5 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x3e487d5)
#19 0x0000000003e50a81 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x3e50a81)
#20 0x0000000003e49286 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x3e49286)
#21 0x0000000004a73a2f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x4a73a2f)
#22 0x0000000004ec0538 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
#23 0x0000000005c5c6a5 clang::ParseAST(clang::Sema&, bool, bool) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x5c5c6a5)
#24 0x0000000004de5273 clang::FrontendAction::Execute() (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x4de5273)
#25 0x0000000004d6971f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x4d6971f)
#26 0x0000000004eb8d94 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x4eb8d94)
#27 0x000000000290af5b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x290af5b)
#28 0x0000000002906814 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#29 0x00000000029056aa clang_main(int, char**, llvm::ToolContext const&) (/home/dim/ins/llvmorg-17-init-16203-ga4521c25ae5/bin/clang+0x29056aa)
Abort trap
This seems related to https://github.com/llvm/llvm-project/issues/64426
When testing the 17.0.1 version I get similar crashes while compiling several unit tests that I've never seen before with earlier versions of clang.