[llvm-bugs] [Bug 46471] New: Assertion `materialized_use_empty() && "Uses remain when a value is destroyed!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 26 14:43:10 PDT 2020


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

            Bug ID: 46471
           Summary: Assertion `materialized_use_empty() && "Uses remain
                    when a value is destroyed!"' failed
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: Vsevolod.Livinskij at frtk.ru
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Error:
>$ clang++ -O3 -march=skx -c func.cpp
While deleting: i64 %
Use still stuck around after Def is destroyed:  %sunkaddr242 = mul i64
<badref>, 8
clang++: /home/vlivinsk/workspace/llvm/llvm-trunk/llvm/lib/IR/Value.cpp:96:
llvm::Value::~Value(): Assertion `materialized_use_empty() && "Uses remain when
a value is destroyed!"' 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: clang++ -O3 -march=skx -c func.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'func.cpp'.
4.      Running pass 'CodeGen Prepare' on function '@_Z1it'
 #0 0x0000561d9217fade llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/clang-11+0x2394ade)
 #1 0x0000561d9217d8b4 llvm::sys::RunSignalHandlers() (/clang-11+0x23928b4)
 #2 0x0000561d9217db31 llvm::sys::CleanupOnSignal(unsigned long)
(/clang-11+0x2392b31)
 #3 0x0000561d920ebb98 CrashRecoverySignalHandler(int) (/clang-11+0x2300b98)
 #4 0x00007f53bb08f540 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x15540)
 #5 0x00007f53bab243eb raise
/build/glibc-t7JzpG/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f53bab03899 abort /build/glibc-t7JzpG/glibc-2.30/stdlib/abort.c:81:7
 #7 0x00007f53bab03769 get_sysdep_segment_value
/build/glibc-t7JzpG/glibc-2.30/intl/loadmsgcat.c:509:8
 #8 0x00007f53bab03769 _nl_load_domain
/build/glibc-t7JzpG/glibc-2.30/intl/loadmsgcat.c:970:34
 #9 0x00007f53bab15006 (/lib/x86_64-linux-gnu/libc.so.6+0x37006)
#10 0x0000561d91b0f09b (/clang-11+0x1d2409b)
#11 0x0000561d91b0f0f8 llvm::Value::deleteValue() (/clang-11+0x1d240f8)
#12 0x0000561d91549dde (anonymous
namespace)::CodeGenPrepare::runOnFunction(llvm::Function&) (.part.0)
(/clang-11+0x175edde)
#13 0x0000561d91ab7d0c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/clang-11+0x1cccd0c)
#14 0x0000561d91ab83d9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/clang-11+0x1ccd3d9)
#15 0x0000561d91ab8787 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/clang-11+0x1ccd787)
#16 0x0000561d9242c773 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> >) (/clang-11+0x2641773)
#17 0x0000561d93113b71
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/clang-11+0x3328b71)
#18 0x0000561d93e918e9 clang::ParseAST(clang::Sema&, bool, bool)
(/clang-11+0x40a68e9)
#19 0x0000561d93112678 clang::CodeGenAction::ExecuteAction()
(/clang-11+0x3327678)
#20 0x0000561d92a54d79 clang::FrontendAction::Execute() (/clang-11+0x2c69d79)
#21 0x0000561d92a0bb0e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/clang-11+0x2c20b0e)
#22 0x0000561d92b29f70
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/clang-11+0x2d3ef70)
#23 0x0000561d90a15139 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/clang-11+0xc2a139)
#24 0x0000561d90a124e8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/clang-11+0xc274e8)
#25 0x0000561d928cde59 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) (/clang-11+0x2ae2e59)
#26 0x0000561d920ebd1c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/clang-11+0x2300d1c)
#27 0x0000561d928ce786
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) (/clang-11+0x2ae3786)
#28 0x0000561d928a5e8c
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (/clang-11+0x2abae8c)
#29 0x0000561d928a67c6
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/clang-11+0x2abb7c6)
#30 0x0000561d928afb69
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/clang-11+0x2ac4b69)
#31 0x0000561d909950f9 main (/clang-11+0xbaa0f9)
#32 0x00007f53bab051e3 __libc_start_main
/build/glibc-t7JzpG/glibc-2.30/csu/../csu/libc-start.c:342:3
#33 0x0000561d90a1203e _start (/clang-11+0xc2703e)
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
ae74252341a0e985a3b637c9b6c30aed9b6f033b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: 
clang-11: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/func-09eb4a.cpp
clang-11: note: diagnostic msg: /tmp/func-09eb4a.sh
clang-11: note: diagnostic msg: 

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

Reproducer:
extern bool a[], b[];
extern int c[];
long d;
short g, h;
void i(unsigned short j) {
  for (;;) {
    for (int e(g); e < j - 6; e += (int)d)
      a[e] = 0;
    for (; h;)
#pragma clang loop vectorize_predicate(enable)
      for (int f = 0; f < -281932314 + 281932330; f += j)
        c[f] = b[f];
  }
}

Clang version 11.0.0 (https://github.com/llvm/llvm-project.git
ae74252341a0e985a3b637c9b6c30aed9b6f033b)

-- 
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/20200626/ab154354/attachment-0001.html>


More information about the llvm-bugs mailing list