[llvm-bugs] [Bug 43799] New: slp-vectorizer crashes: Assertion `Elt->getType() == Val->getType()->getVectorElementType() && "Insertelement types must match!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 24 19:43:38 PDT 2019


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

            Bug ID: 43799
           Summary: slp-vectorizer crashes: Assertion `Elt->getType() ==
                    Val->getType()->getVectorElementType() &&
                    "Insertelement types must match!"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: cszide at 163.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22725
  --> https://bugs.llvm.org/attachment.cgi?id=22725&action=edit
vdir.bc

$clang -v
clang version 10.0.0 (https://github.com/llvm/llvm-project.git
e3b49df50e4f463f1b0bed5a0a476eafafd1d426)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt -mem2reg -inline -globaldce -loop-reduce -loop-rotate -loop-idiom
-loop-unroll -slp-vectorizer vdir.bc 
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/llvm/lib/IR/Constants.cpp:2142:
static llvm::Constant* llvm::ConstantExpr::getInsertElement(llvm::Constant*,
llvm::Constant*, llvm::Constant*, llvm::Type*): Assertion `Elt->getType() ==
Val->getType()->getVectorElementType() && "Insertelement types must match!"'
failed.
Stack dump:
0.      Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt -mem2reg
-inline -globaldce -loop-reduce -loop-rotate -loop-idiom -loop-unroll
-slp-vectorizer vdir.bc 
1.      Running pass 'Function Pass Manager' on module 'vdir.bc'.
2.      Running pass 'SLP Vectorizer' on function '@print_current_files'
 #0 0x00005634cb9c556a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x285a56a)
 #1 0x00005634cb9c3234 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2858234)
 #2 0x00005634cb9c3372 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2858372)
 #3 0x00007f315bac8890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f315a77ae97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f315a77c801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f315a76c39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f315a76c412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x00005634cb218163 llvm::ConstantExpr::getInsertElement(llvm::Constant*,
llvm::Constant*, llvm::Constant*, llvm::Type*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x20ad163)
 #9 0x00005634cbb613e4
llvm::slpvectorizer::BoUpSLP::Gather(llvm::ArrayRef<llvm::Value*>,
llvm::VectorType*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f63e4)
#10 0x00005634cbb61cda
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6cda)
#11 0x00005634cbb62b8d
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f7b8d)
#12 0x00005634cbb61d8a
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6d8a)
#13 0x00005634cbb634e0
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f84e0)
#14 0x00005634cbb61d8a
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6d8a)
#15 0x00005634cbb62b11
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f7b11)
#16 0x00005634cbb61d8a
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6d8a)
#17 0x00005634cbb634e0
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f84e0)
#18 0x00005634cbb61d8a
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6d8a)
#19 0x00005634cbb634e0
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f84e0)
#20 0x00005634cbb61d8a
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f6d8a)
#21 0x00005634cbb634e0
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f84e0)
#22 0x00005634cbb64222
llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::MapVector<llvm::Value*,
llvm::SmallVector<llvm::Instruction*, 2u>, llvm::DenseMap<llvm::Value*,
unsigned int, llvm::DenseMapInfo<llvm::Value*>,
llvm::detail::DenseMapPair<llvm::Value*, unsigned int> >,
std::vector<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>
>, std::allocator<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*,
2u> > > > >&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29f9222)
#23 0x00005634cbb65814 llvm::slpvectorizer::BoUpSLP::vectorizeTree()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x29fa814)
#24 0x00005634cbb6d289
llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>,
llvm::slpvectorizer::BoUpSLP&, int, bool)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2a02289)
#25 0x00005634cbb72983
llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*,
llvm::slpvectorizer::BoUpSLP&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2a07983)
#26 0x00005634cbb73994 llvm::SLPVectorizerPass::runImpl(llvm::Function&,
llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*,
llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*,
llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*)
(.part.1495)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2a08994)
#27 0x00005634cbb74db1 (anonymous
namespace)::SLPVectorizer::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2a09db1)
#28 0x00005634cb2db239 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2170239)
#29 0x00005634cb2dbbe9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2170be9)
#30 0x00005634cb2da491 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x216f491)
#31 0x00005634c9a6f10f main
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x90410f)
#32 0x00007f315a75db97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#33 0x00005634c9b05f6a _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x99af6a)
Aborted (core dumped)

-- 
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/20191025/b27c5db9/attachment-0001.html>


More information about the llvm-bugs mailing list