[llvm-bugs] [Bug 43371] New: opt -loop-vectorize failing with Assertion `!BB->getParent()->hasOptSize() && "Cannot SCEV check stride or overflow when optimizing for size"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 20 01:05:42 PDT 2019


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

            Bug ID: 43371
           Summary: opt -loop-vectorize failing with Assertion
                    `!BB->getParent()->hasOptSize() && "Cannot SCEV check
                    stride or overflow when optimizing for size"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22535
  --> https://bugs.llvm.org/attachment.cgi?id=22535&action=edit
reproducer

opt -S -o /dev/null lv-optsize-fail-assert-2.ll -loop-vectorize

crashes with

opt: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2699: void
llvm::InnerLoopVectorizer::emitSCEVChecks(llvm::Loop *, llvm::BasicBlock *):
Assertion `!BB->getParent()->hasOptSize() && "Cannot SCEV check stride or
overflow when optimizing for size"' failed.
Stack dump:
0.      Program arguments: build-all/bin/opt -S -o /dev/null
lv-optsize-fail-assert-2.ll -loop-vectorize 
1.      Running pass 'Function Pass Manager' on module
'lv-optsize-fail-assert-2.ll'.
2.      Running pass 'Loop Vectorization' on function '@test_memcpy_imm_1'
 #0 0x00000000024344d4 PrintStackTraceSignalHandler(void*)
(build-all/bin/opt+0x24344d4)
 #1 0x00000000024321fe llvm::sys::RunSignalHandlers()
(build-all/bin/opt+0x24321fe)
 #2 0x00000000024348d8 SignalHandler(int) (build-all/bin/opt+0x24348d8)
 #3 0x00007f5e1249f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f5e10f48e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f5e10f4a801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f5e10f3a39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f5e10f3a412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x00000000025508dc llvm::InnerLoopVectorizer::emitSCEVChecks(llvm::Loop*,
llvm::BasicBlock*) (build-all/bin/opt+0x25508dc)
 #9 0x0000000002550dd0
llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton()
(build-all/bin/opt+0x2550dd0)
#10 0x00000000025689f1
llvm::LoopVectorizationPlanner::executePlan(llvm::InnerLoopVectorizer&,
llvm::DominatorTree*) (build-all/bin/opt+0x25689f1)
#11 0x00000000025730e9 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(build-all/bin/opt+0x25730e9)
#12 0x0000000002574984 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(build-all/bin/opt+0x2574984)
#13 0x0000000002578297 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x2578297)
#14 0x0000000001da3bf3 llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x1da3bf3)
#15 0x0000000001da3f03 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all/bin/opt+0x1da3f03)
#16 0x0000000001da456d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all/bin/opt+0x1da456d)
#17 0x00000000007d9b3d main (build-all/bin/opt+0x7d9b3d)
#18 0x00007f5e10f2bb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#19 0x00000000007bec7a _start (build-all/bin/opt+0x7bec7a)
Abort (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/20190920/902105fb/attachment.html>


More information about the llvm-bugs mailing list