[llvm-bugs] [Bug 48476] New: A/F: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2496: llvm::slpvectorizer::BoUpSLP::~BoUpSLP(): Assertion `!verifyFunction(*F, &dbgs())' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 10 13:19:27 PST 2020


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

            Bug ID: 48476
           Summary: A/F:
                    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2496:
                    llvm::slpvectorizer::BoUpSLP::~BoUpSLP(): Assertion
                    `!verifyFunction(*F, &dbgs())' failed.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: douglas_yung at playstation.sony.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

In our internal testing, we hit an assertion that I bisected down to commit
c63799fc52ff2473dc64cdbc343cefb8bb786b6b. To reproduce the failure compile the
following code with optimizations and AVX extensions:

/* test3.cpp */
typedef double a __attribute__((__vector_size__(16)));
a b, c, d;
void e() {
  a f = __builtin_ia32_addsubpd(c, d), g = __builtin_ia32_cmpnlesd(f, b);
  volatile double h(g[0]);
}


Build the above repro with the following arguments:
$ clang -O2 -mavx test3.cpp
Instruction does not dominate all uses!
  %4 = fsub <2 x double> %0, %1                           
  %3 = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %4, <2 x
double> %2, i8 6)
clang-12:
/home/dyung/src/upstream/llvm_clean_git/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2496:
llvm::slpvectorizer::BoUpSLP::~BoUpSLP(): Assertion `!verifyFunction(*F,
&dbgs())' failed.

With a stack trace of the crash as follows:
1.      <eof> parser at end of file                                             
2.      Per-module optimization passes                                          
3.      Running pass 'Function Pass Manager' on module 'test3.cpp'.            
                                                                               
                                                                               
                            4.      Running pass 'SLP Vectorizer' on function
'@_Z1ev'                                                                        
 #0 0x000000000548d3c3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x548d3c3) 
 #1 0x000000000548b1ce llvm::sys::RunSignalHandlers()
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x548b1ce) 
 #2 0x000000000548d885 SignalHandler(int)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x548d885) 
 #3 0x00007f960ccac3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)                                 
 #4 0x00007f960c75d18b raise
/build/glibc-YYA7BZ/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1  
                                                                               
                                                                               
#5 0x00007f960c73c859 abort /build/glibc-YYA7BZ/glibc-2.31/stdlib/abort.c:81:7  
 #6 0x00007f960c73c729 get_sysdep_segment_value
/build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:509:8                          
 #7 0x00007f960c73c729 _nl_load_domain
/build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:970:34                         
 #8 0x00007f960c74df36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)                
 #9 0x0000000005633ed5 llvm::slpvectorizer::BoUpSLP::~BoUpSLP()
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5633ed5) 
#10 0x0000000005652806 llvm::SLPVectorizerPass::runImpl(llvm::Function&,
llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*,
llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*,
llvm::AssumptionCache*, llvm::DemandedBits*, llvm::Optimizat
ionRemarkEmitter*)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5652806) 
#11 0x0000000005668ed9 (anonymous
namespace)::SLPVectorizer::runOnFunction(llvm::Function&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5668ed9) 
#12 0x0000000004ced158 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x4ced158)
#13 0x0000000004cf3a68 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x4cf3a68)
#14 0x0000000004ced807 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x4ced807)
#15 0x00000000056d3de3 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction, std::uniqu
e_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x56d3de3)
#16 0x0000000005e8cab4
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5e8cab4)
#17 0x0000000006f535a3 clang::ParseAST(clang::Sema&, bool, bool)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x6f535a3)
#18 0x0000000005dd51b3 clang::FrontendAction::Execute()
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5dd51b3)
#19 0x0000000005d2bc12
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5d2bc12)
#20 0x0000000005e86b02
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x5e86b02)
#21 0x000000000345e503 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x345e503)
#22 0x000000000345c22c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x345c22c)
#23 0x000000000345bec3 main
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x345bec3)
#24 0x00007f960c73e0b3 __libc_start_main
/build/glibc-YYA7BZ/glibc-2.31/csu/../csu/libc-start.c:342:3                    
#25 0x0000000003458ebe _start
(/home/dyung/src/upstream/c63799fc52ff2473dc64cdbc343cefb8bb786b6b-linux/bin/clang-12+0x3458ebe)

-- 
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/20201210/6ecb2345/attachment-0001.html>


More information about the llvm-bugs mailing list