[llvm-bugs] [Bug 45871] New: Assertion `VT.getSizeInBits() == Operand.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 11 01:26:18 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45871
Bug ID: 45871
Summary: Assertion `VT.getSizeInBits() ==
Operand.getValueSizeInBits() && "Cannot BITCAST
between types of different sizes!"' failed
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: stephan.bergmann.secondary at googlemail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
At least with recent Clang trunk on x86_64-unknown-linux-gnu:
> $ cat test.cc
> template<typename T> using V = T __attribute__((ext_vector_type(1)));
> using F = V<float>;
> void f(long n, F & g) {
> V<long> v = n;
> v >>= 16;
> g = __builtin_convertvector((v >> 16) & 1, F);
> }
> $ clang++ -O -c test.cc
> clang++: llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4749: llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags): Assertion `VT.getSizeInBits() == Operand.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed.
> PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
> Stack dump:
> 0. Program arguments: llvm/inst/bin/clang++ -O -c test.cc
> 1. <eof> parser at end of file
> 2. Code generation
> 3. Running pass 'Function Pass Manager' on module 'test.cc'.
> 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z1flRDv1_f'
> #0 0x00000000028ea1ea llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm-project/llvm/lib/Support/Unix/Signals.inc:568:3
> #1 0x00000000028e82e4 llvm::sys::RunSignalHandlers() llvm-project/llvm/lib/Support/Signals.cpp:68:20
> #2 0x00000000028712e8 HandleCrash llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
> #3 0x00000000028712e8 CrashRecoverySignalHandler(int) llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:382:62
> #4 0x00007f69ed338a90 __restore_rt (/lib64/libpthread.so.0+0x14a90)
> #5 0x00007f69ece4da25 raise /usr/src/debug/glibc-2.31-17-gab029a2801/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
> #6 0x00007f69ece36895 abort /usr/src/debug/glibc-2.31-17-gab029a2801/stdlib/abort.c:81:7
> #7 0x00007f69ece36769 get_sysdep_segment_value /usr/src/debug/glibc-2.31-17-gab029a2801/intl/loadmsgcat.c:509:8
> #8 0x00007f69ece36769 _nl_load_domain.cold /usr/src/debug/glibc-2.31-17-gab029a2801/intl/loadmsgcat.c:970:34
> #9 0x00007f69ece45e86 (/lib64/libc.so.6+0x34e86)
> #10 0x00000000036188a1 llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags) (.localalias) llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4598:5
> #11 0x0000000003619b3c llvm::TrackingMDRef::untrack() llvm-project/llvm/include/llvm/IR/TrackingMDRef.h:89:9
> #12 0x0000000003619b3c llvm::TrackingMDRef::~TrackingMDRef() llvm-project/llvm/include/llvm/IR/TrackingMDRef.h:55:29
> #13 0x0000000003619b3c llvm::TypedTrackingMDRef<llvm::MDNode>::~TypedTrackingMDRef() llvm-project/llvm/include/llvm/IR/TrackingMDRef.h:106:26
> #14 0x0000000003619b3c llvm::DebugLoc::~DebugLoc() llvm-project/llvm/include/llvm/IR/DebugLoc.h:33:9
> #15 0x0000000003619b3c llvm::SDLoc::~SDLoc() llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1111:7
> #16 0x0000000003619b3c llvm::SelectionDAG::getBitcast(llvm::EVT, llvm::SDValue) llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1912:32
> #17 0x000000000183699a llvm::SDNode::getOperand(unsigned int) const llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:930:5
> #18 0x000000000183699a combineVectorCompareAndMaskUnaryOp llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:45614:72
> #19 0x000000000183699a combineSIntToFP(llvm::SDNode*, llvm::SelectionDAG&, llvm::TargetLowering::DAGCombinerInfo&, llvm::X86Subtarget const&) llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:45702:62
> #20 0x00000000035510ee (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1665:10
> #21 0x0000000003553006 Run llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1471:27
> #22 0x0000000003553006 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level) llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:21822:39
> #23 0x000000000364da7f llvm::TimeRegion::~TimeRegion() llvm-project/llvm/include/llvm/Support/Timer.h:152:9
> #24 0x000000000364da7f llvm::NamedRegionTimer::~NamedRegionTimer() llvm-project/llvm/include/llvm/Support/Timer.h:160:8
> #25 0x000000000364da7f llvm::SelectionDAGISel::CodeGenAndEmitDAG() llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:814:61
> #26 0x000000000365311d llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1616:33
> #27 0x0000000003655205 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:504:22
> #28 0x00000000017bf173 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:192:5
> #29 0x0000000001dbb2c5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:33
> #30 0x00000000021b2403 llvm::FPPassManager::runOnFunction(llvm::Function&) llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1483:7
> #31 0x00000000021b2a41 llvm::ilist_node_base<true>::getNext() const llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:43:45
> #32 0x00000000021b2a41 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, true, false, void> >::getNext() llvm-project/llvm/include/llvm/ADT/ilist_node.h:66:66
> #33 0x00000000021b2a41 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, true, false, void>, false, false>::operator++() llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:157:25
> #34 0x00000000021b2a41 llvm::FPPassManager::runOnModule(llvm::Module&) llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1517:22
> #35 0x00000000021b2dde runOnModule llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1584:7
> #36 0x00000000021b2dde llvm::legacy::PassManagerImpl::run(llvm::Module&) llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1695:55
> #37 0x0000000002b4be9e llvm::TimeTraceScope::~TimeTraceScope() llvm-project/llvm/include/llvm/Support/TimeProfiler.h:86:37
> #38 0x0000000002b4be9e (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) llvm-project/clang/lib/CodeGen/BackendUtil.cpp:948:51
> #39 0x0000000002b4d544 std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >::~unique_ptr() /usr/include/c++/10/bits/unique_ptr.h:359:12
> #40 0x0000000002b4d544 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1657:49
> #41 0x0000000003764016 std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >::~unique_ptr() /usr/include/c++/10/bits/unique_ptr.h:359:12
> #42 0x0000000003764016 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:337:69
> #43 0x0000000004116e49 clang::ParseAST(clang::Sema&, bool, bool) llvm-project/clang/lib/Parse/ParseAST.cpp:171:34
> #44 0x00000000031038d1 clang::FrontendAction::Execute() llvm-project/clang/lib/Frontend/FrontendAction.cpp:953:21
> #45 0x00000000030bfa06 llvm::Error::setChecked(bool) llvm-project/llvm/include/llvm/Support/Error.h:305:22
> #46 0x00000000030bfa06 llvm::Error::operator bool() llvm-project/llvm/include/llvm/Support/Error.h:236:15
> #47 0x00000000030bfa06 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) llvm-project/clang/lib/Frontend/CompilerInstance.cpp:973:42
> #48 0x00000000031b4837 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:282:38
> #49 0x00000000009368d0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) llvm-project/clang/tools/driver/cc1_main.cpp:240:40
> #50 0x0000000000932ced ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) llvm-project/clang/tools/driver/driver.cpp:330:20
> #51 0x0000000002fa50e5 operator() llvm-project/clang/lib/Driver/Job.cpp:417:32
> #52 0x0000000002fa50e5 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) llvm-project/llvm/include/llvm/ADT/STLExtras.h:185:52
> #53 0x0000000002871454 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:419:10
> #54 0x0000000002fa604b clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) llvm-project/clang/lib/Driver/Job.cpp:421:10
> #55 0x0000000002f7d3a6 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const llvm-project/clang/lib/Driver/Compilation.cpp:196:3
> #56 0x0000000002f7d805 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const llvm-project/clang/lib/Driver/Compilation.cpp:246:5
> #57 0x0000000002f887d1 llvm::SmallVectorBase<unsigned int>::empty() const llvm-project/llvm/include/llvm/ADT/SmallVector.h:69:47
> #58 0x0000000002f887d1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) llvm-project/clang/lib/Driver/Driver.cpp:1483:28
> #59 0x0000000000874ae8 main llvm-project/clang/tools/driver/driver.cpp:502:39
> #60 0x00007f69ece38042 __libc_start_main /usr/src/debug/glibc-2.31-17-gab029a2801/csu/../csu/libc-start.c:308:16
> #61 0x000000000093227e _start (llvm/inst/bin/clang+++0x93227e)
> clang-11: error: clang frontend command failed due to signal (use -v to see invocation)
> clang version 11.0.0 (https://github.com/llvm/llvm-project.git dbabd2db65c91fdba86010d370008b15cad539b5)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200511/b77b9c50/attachment-0001.html>
More information about the llvm-bugs
mailing list