[llvm-bugs] [Bug 40290] New: Regression since SVN r350841, "[SelectionDAGBuilder] Refactor GetRegistersForValue. NFCI."
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jan 10 23:30:54 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40290
Bug ID: 40290
Summary: Regression since SVN r350841, "[SelectionDAGBuilder]
Refactor GetRegistersForValue. NFCI."
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: martin at martin.st
CC: llvm-bugs at lists.llvm.org, niravd at google.com
Created attachment 21314
--> https://bugs.llvm.org/attachment.cgi?id=21314&action=edit
Reproduction sample
The commit SVN r350841, "[SelectionDAGBuilder] Refactor GetRegistersForValue.
NFCI." caused compilation regressions for me.
With the attached sample, compilation fails like this for me:
$ clang -target i686-w64-mingw32 -c -O2 preproc.c
clang-8: ../lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7431: void
GetRegistersForValue(llvm::SelectionDAG&, const llvm::SDLoc&,
{anonymous}::SDISelAsmOperandInfo&, {anonymous}::SDISelAsmOperandInfo&):
Assertion `I != RC->end() && "Didn't find reg!"' failed.
Stack dump:
0. Program arguments: /home/martin/code/llvm-bisect/build/bin/clang-8 -cc1
-triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name preproc.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info
-debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file
/home/martin/code/llvm-bisect/build/preproc.gcno -resource-dir
/home/martin/code/llvm-bisect/build/lib/clang/8.0.0 -internal-isystem
/home/martin/code/llvm-bisect/build/lib/clang/8.0.0/include -internal-isystem
/usr/i686-w64-mingw32/sys-root/mingw/include -internal-isystem
/usr/i686-w64-mingw32/include -internal-isystem /usr/include -O2
-fdebug-compilation-dir /home/martin/code/llvm-bisect/build -ferror-limit 19
-fmessage-length 197 -fno-use-cxa-atexit -fobjc-runtime=gcc -fdwarf-exceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o preproc.o -x c preproc.c -faddrsig
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'preproc.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@fesetenv'
#0 0x0000000001b4332a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1b4332a)
#1 0x0000000001b4112c llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1b4112c)
#2 0x0000000001b41297 SignalHandler(int)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1b41297)
#3 0x00007ff184195390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007ff182f07428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007ff182f0902a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007ff182effbd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007ff182effc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00000000024ed8d5 GetRegistersForValue(llvm::SelectionDAG&, llvm::SDLoc
const&, (anonymous namespace)::SDISelAsmOperandInfo&, (anonymous
namespace)::SDISelAsmOperandInfo&) (.constprop.1487)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x24ed8d5)
#9 0x000000000250f624
llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x250f624)
#10 0x000000000251f7c7 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x251f7c7)
#11 0x00000000025269df llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x25269df)
#12 0x00000000025746c9
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/martin/code/llvm-bisect/build/bin/clang-8+0x25746c9)
#13 0x000000000257cf5c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x257cf5c)
#14 0x000000000257f141
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.868.constprop.892)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x257f141)
#15 0x0000000000dd8790 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0xdd8790)
#16 0x000000000129a1c1
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.34.constprop.35)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x129a1c1)
#17 0x0000000001649b1c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1649b1c)
#18 0x0000000001649cfc llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1649cfc)
#19 0x000000000164ae19 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x164ae19)
#20 0x0000000001d1c1ed (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1d1c1ed)
#21 0x0000000001d1db19 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/martin/code/llvm-bisect/build/bin/clang-8+0x1d1db19)
#22 0x000000000264cd57
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x264cd57)
#23 0x0000000002f0dbd9 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2f0dbd9)
#24 0x000000000264c0cf clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x264c0cf)
#25 0x000000000219ae5e clang::FrontendAction::Execute()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x219ae5e)
#26 0x000000000215ff2e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x215ff2e)
#27 0x0000000002236d2c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2236d2c)
#28 0x00000000009a7898 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x9a7898)
#29 0x000000000092c766 main
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x92c766)
#30 0x00007ff182ef2830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#31 0x00000000009a3719 _start
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x9a3719)
I'll revert the commit for now.
--
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/20190111/00e09f57/attachment-0001.html>
More information about the llvm-bugs
mailing list