[llvm-bugs] [Bug 35158] New: ToT llvm+clang crashes when building ToT llvm+clang with "-march=knl”

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 31 21:42:01 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=35158

            Bug ID: 35158
           Summary: ToT llvm+clang crashes when building ToT llvm+clang
                    with "-march=knl”
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: dave at znu.io
                CC: llvm-bugs at lists.llvm.org

ToT llvm+clang crashes when building ToT llvm+clang with "-march=knl”.

Sorry, I don't have any of the metadata it requested handy. I did try and debug
it a little bit though. It looks like a v64i8 register was requested, but "knl"
doesn't support that register class. Maybe some custom lowering is missing? Or
maybe a missing HasBWI flag is needed in the instruction tables?


/usr/local/bin/clang++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/IR
-I../lib/IR -Iinclude -I../include -march=knl -fPIC -fvisibility-inlines-hidden
-Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics
-ffunction-sections -fdata-sections -O2 -DNDEBUG    -fno-exceptions -fno-rtti
-MD -MT lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o -MF
lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o.d -o
lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o -c
../lib/IR/DebugInfoMetadata.cpp
clang-6.0: ../include/llvm/Target/TargetLowering.h:584: virtual const
llvm::TargetRegisterClass *llvm::TargetLoweringBase::getRegClassFor(llvm::MVT)
const: Assertion `RC && "This value type is not natively supported!"' failed.
#0 0x00000000023370a9 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/zarzycki/wt/llvm/d/../lib/Support/Unix/Signals.inc:398:11
#1 0x0000000002337259 PrintStackTraceSignalHandler(void*)
/home/zarzycki/wt/llvm/d/../lib/Support/Unix/Signals.inc:462:1
#2 0x0000000002335853 llvm::sys::RunSignalHandlers()
/home/zarzycki/wt/llvm/d/../lib/Support/Signals.cpp:0:5
#3 0x00000000023375e7 SignalHandler(int)
/home/zarzycki/wt/llvm/d/../lib/Support/Unix/Signals.inc:252:1
#4 0x00007f9fb330c3b0 __restore_rt (/lib64/libpthread.so.0+0x123b0)
#5 0x00007f9fb22999fb __GI_raise (/lib64/libc.so.6+0x369fb)
#6 0x00007f9fb229b800 __GI_abort (/lib64/libc.so.6+0x38800)
#7 0x00007f9fb22920da __assert_fail_base (/lib64/libc.so.6+0x2f0da)
#8 0x00007f9fb2292152 (/lib64/libc.so.6+0x2f152)
#9 0x0000000001062626 llvm::TargetLoweringBase::getRegClassFor(llvm::MVT) const
/home/zarzycki/wt/llvm/d/../include/llvm/Target/TargetLowering.h:585:12
#10 0x000000000339eb54 llvm::InstrEmitter::EmitSubregNode(llvm::SDNode*,
llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>,
llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&, bool, bool)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/InstrEmitter.cpp:573:32
#11 0x000000000339fbdb llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool,
bool, llvm::DenseMap<llvm::SDValue, unsigned int,
llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue,
unsigned int> >&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/InstrEmitter.cpp:752:5
#12 0x0000000003394bb6 llvm::InstrEmitter::EmitNode(llvm::SDNode*, bool, bool,
llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>,
llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/InstrEmitter.h:121:7
#13 0x0000000003392063
llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr,
false>&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:848:9
#14 0x00000000032dfc1e llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:880:42
#15 0x00000000032dd9a0
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:665:1
#16 0x00000000032dd6a1
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:0:7
#17 0x00000000032da98d
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:467:22
#18 0x0000000000ebb8db (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/zarzycki/wt/llvm/d/../lib/Target/X86/X86ISelDAGToDAG.cpp:177:25
#19 0x00000000016290d4
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/zarzycki/wt/llvm/d/../lib/CodeGen/MachineFunctionPass.cpp:62:8
#20 0x0000000001bb0f8f llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/zarzycki/wt/llvm/d/../lib/IR/LegacyPassManager.cpp:1514:27
#21 0x0000000001bb12a5 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/zarzycki/wt/llvm/d/../lib/IR/LegacyPassManager.cpp:1535:16
#22 0x0000000001bb1a6a (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/zarzycki/wt/llvm/d/../lib/IR/LegacyPassManager.cpp:1591:27
#23 0x0000000001bb1566 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/zarzycki/wt/llvm/d/../lib/IR/LegacyPassManager.cpp:1694:16
#24 0x0000000001bb1f81 llvm::legacy::PassManager::run(llvm::Module&)
/home/zarzycki/wt/llvm/d/../lib/IR/LegacyPassManager.cpp:1725:3
#25 0x0000000002666209 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/CodeGen/BackendUtil.cpp:794:19
#26 0x000000000266396f 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> >)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/CodeGen/BackendUtil.cpp:1145:15
#27 0x00000000033f258c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/CodeGen/CodeGenAction.cpp:292:7
#28 0x00000000044b65c6 clang::ParseAST(clang::Sema&, bool, bool)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/Parse/ParseAST.cpp:159:13
#29 0x0000000002dfc092 clang::ASTFrontendAction::ExecuteAction()
/home/zarzycki/wt/llvm/d/../tools/clang/lib/Frontend/FrontendAction.cpp:1000:1
#30 0x00000000033ef983 clang::CodeGenAction::ExecuteAction()
/home/zarzycki/wt/llvm/d/../tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:1
#31 0x0000000002dfbaf6 clang::FrontendAction::Execute()
/home/zarzycki/wt/llvm/d/../tools/clang/lib/Frontend/FrontendAction.cpp:901:7
#32 0x0000000002d8839b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/Frontend/CompilerInstance.cpp:992:7
#33 0x0000000002f7e5a9
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/zarzycki/wt/llvm/d/../tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:8
#34 0x0000000000ddbde9 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/zarzycki/wt/llvm/d/../tools/clang/tools/driver/cc1_main.cpp:221:11
#35 0x0000000000dce969 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/home/zarzycki/wt/llvm/d/../tools/clang/tools/driver/driver.cpp:309:5
#36 0x0000000000dcd66d main
/home/zarzycki/wt/llvm/d/../tools/clang/tools/driver/driver.cpp:388:5
#37 0x00007f9fb228388a __libc_start_main (/lib64/libc.so.6+0x2088a)
#38 0x0000000000dcc49a _start (/usr/local/bin/clang-6.0+0xdcc49a)
Stack dump:
0.      Program arguments: /usr/local/bin/clang-6.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
DebugInfoMetadata.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu knl -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -ffunction-sections -fdata-sections
-coverage-notes-file
/home/zarzycki/wt/llvm/b/lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.gcno
-resource-dir /usr/local/lib/clang/6.0.0 -dependency-file
lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o.d -sys-header-deps -MT
lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o -D GTEST_HAS_RTTI=0 -D
_GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D
__STDC_LIMIT_MACROS -I lib/IR -I ../lib/IR -I include -I ../include -D NDEBUG
-internal-isystem /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/x86_64-redhat-linux
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/lib/clang/6.0.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -Werror=date-time
-Werror=unguarded-availability-new -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long
-Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
-Wstring-conversion -pedantic -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/zarzycki/wt/llvm/b -ferror-limit 19
-fmessage-length 0 -fvisibility-inlines-hidden -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o -x c++
../lib/IR/DebugInfoMetadata.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'../lib/IR/DebugInfoMetadata.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_ZN4llvm10MDNodeInfoINS_15DICompositeTypeEE12getHashValueEPKS1_'
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (https://git.llvm.org/git/clang.git
a934273b7cd28c48745e4c5a122ca3a505ab2028) (https://git.llvm.org/git/llvm.git
b0f1f2331d95ef29e654038ed1e8a5a9573e0f77)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/DebugInfoMetadata-01bf1f.cpp
clang-6.0: note: diagnostic msg: /tmp/DebugInfoMetadata-01bf1f.sh
clang-6.0: note: diagnostic msg:

********************

-- 
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/20171101/21cfe665/attachment-0001.html>


More information about the llvm-bugs mailing list