Skip to content

[AArch64] AArch64DAGToDAGISel::SelectPostLoadLane hits invalid cast #35333

@serge-sans-paille

Description

@serge-sans-paille
Bugzilla Link 35985
Version 5.0
OS Linux
Attachments input, reduced minimal test case
CC @Arnaud-de-Grandmaison-ARM,@smithp35

Extended Description

The reduced .ll file, when compiled with

./bin/clang -cc1 -triple aarch64--linux-android -emit-obj buggy-4.ll

hits the following traceback:

#​0 0x00007fbdcc61d43f llvm::sys::PrintStackTrace(llvm::raw_ostream&) .../_build/../lib/Support/Unix/Signals.inc:398:13
#​1 0x00007fbdcc61d746 bool __gnu_cxx::operator!=<std::pair<void ()(void), void*>, std::vector<std::pair<void ()(void*), void*>, std::allocator<std::pair<void ()(void), void*> > > >(__gnu_cxx::__normal_iterator<std::pair<void ()(void), void*>, std::vector<std::pair<void ()(void*), void*>, std::allocator<std::pair<void ()(void), void*> > > > const&, __gnu_cxx::__normal_iterator<std::pair<void ()(void), void*>, std::vector<std::pair<void ()(void*), void*>, std::allocator<std::pair<void ()(void), void*> > > > const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/stl_iterator.h:883:27
#​2 0x00007fbdcc61d746 llvm::sys::RunSignalHandlers() .../_build/../lib/Support/Signals.cpp:49:0
#​3 0x00007fbdcc61d746 SignalHandler(int) .../_build/../lib/Support/Unix/Signals.inc:242:0
#​4 0x00007fbdcbca8160 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12160)
#​5 0x00007fbdc987b6a0 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x346a0)
#​6 0x00007fbdc987ccf7 abort (/lib/x86_64-linux-gnu/libc.so.6+0x35cf7)
#​7 0x00007fbdc9873fca (/lib/x86_64-linux-gnu/libc.so.6+0x2cfca)
#​8 0x00007fbdc9874042 (/lib/x86_64-linux-gnu/libc.so.6+0x2d042)
#​9 0x00007fbddb19f439 llvm::APInt::getZExtValue() const .../_build/../include/llvm/ADT/APInt.h:1545:5
#​10 0x00007fbddb19f439 llvm::ConstantInt::getZExtValue() const .../_build/../include/llvm/IR/Constants.h:150:0
#​11 0x00007fbddb19f439 llvm::ConstantSDNode::getZExtValue() const .../_build/../include/llvm/CodeGen/SelectionDAGNodes.h:1437:0
#​12 0x00007fbddb19f439 (anonymous namespace)::AArch64DAGToDAGISel::SelectPostLoadLane(llvm::SDNode*, unsigned int, unsigned int) .../_build/../lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:1382:0
#​13 0x00007fbdc903c49a llvm::SelectionDAGISel::DoInstructionSelection() .../_build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:944:28
#​14 0x00007fbdc903b99d llvm::TimeRegion::~TimeRegion() .../_build/../include/llvm/Support/Timer.h:152:9
#​15 0x00007fbdc903b99d llvm::SelectionDAGISel::CodeGenAndEmitDAG() .../_build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:848:0
#​16 0x00007fbdc90391cf llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) .../_build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1609:11
#​17 0x00007fbdc90361d6 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) .../_build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:467:7
#​18 0x00007fbdce6e1604 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) .../_build/../lib/CodeGen/MachineFunctionPass.cpp:62:13
#​19 0x00007fbdce14902f llvm::FPPassManager::runOnFunction(llvm::Function&) .../_build/../lib/IR/LegacyPassManager.cpp:1514:27
#​20 0x00007fbdce149283 llvm::FPPassManager::runOnModule(llvm::Module&) .../_build/../lib/IR/LegacyPassManager.cpp:1535:13
#​21 0x00007fbdce149779 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) .../_build/../lib/IR/LegacyPassManager.cpp:1591:27
#​22 0x00007fbdce149779 llvm::legacy::PassManagerImpl::run(llvm::Module&) .../_build/../lib/IR/LegacyPassManager.cpp:1694:0

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:AArch64bugzillaIssues migrated from bugzillacrashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions