<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Regression since SVN r350841, "[SelectionDAGBuilder] Refactor GetRegistersForValue. NFCI.""
href="https://bugs.llvm.org/show_bug.cgi?id=40290">40290</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression since SVN r350841, "[SelectionDAGBuilder] Refactor GetRegistersForValue. NFCI."
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>martin@martin.st
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, niravd@google.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21314" name="attach_21314" title="Reproduction sample">attachment 21314</a> <a href="attachment.cgi?id=21314&action=edit" title="Reproduction sample">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>