[llvm-bugs] [Bug 28245] New: Assertion due to buildMemoryAccess

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 21 08:56:28 PDT 2016


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

            Bug ID: 28245
           Summary: Assertion due to buildMemoryAccess
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: huihuiz at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Below is the command that causes an assertion with attached test

opt -polly-allow-nonaffine-loops -polly-process-unprofitable -polly-scops
nonaffine-buildMemoryAccess.ll

#0 0x00000000011fc448 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(./bin/opt+0x11fc448)
#1 0x00000000011fa1d6 llvm::sys::RunSignalHandlers() (./bin/opt+0x11fa1d6)
#2 0x00000000011fcb7a SignalHandler(int) (./bin/opt+0x11fcb7a)
#3 0x00007f34a72accb0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x00007f34a64f30d5 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x360d5)
#5 0x00007f34a64f683b abort (/lib/x86_64-linux-gnu/libc.so.6+0x3983b)
#6 0x00000000018a5b77 (./bin/opt+0x18a5b77)
#7 0x0000000001853cf6 isl_aff_set_coefficient_si (./bin/opt+0x1853cf6)
#8 0x00000000013caa30
polly::SCEVAffinator::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
(./bin/opt+0x13caa30)
#9 0x00000000013ca290 llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
(./bin/opt+0x13ca290)
#10 0x00000000013c9cd5 polly::SCEVAffinator::visit(llvm::SCEV const*)
(./bin/opt+0x13c9cd5)
#11 0x00000000013caa9c
polly::SCEVAffinator::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
(./bin/opt+0x13caa9c)
#12 0x00000000013ca290 llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
(./bin/opt+0x13ca290)
#13 0x00000000013c9cd5 polly::SCEVAffinator::visit(llvm::SCEV const*)
(./bin/opt+0x13c9cd5)
#14 0x00000000013caef5
polly::SCEVAffinator::visitSDivInstruction(llvm::Instruction*)
(./bin/opt+0x13caef5)
#15 0x00000000013cb2c9 polly::SCEVAffinator::visitUnknown(llvm::SCEVUnknown
const*) (./bin/opt+0x13cb2c9)
#16 0x00000000013ca2b7 llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
(./bin/opt+0x13ca2b7)
#17 0x00000000013c9cd5 polly::SCEVAffinator::visit(llvm::SCEV const*)
(./bin/opt+0x13c9cd5)
#18 0x00000000013ca282 llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
(./bin/opt+0x13ca282)
#19 0x00000000013c9cd5 polly::SCEVAffinator::visit(llvm::SCEV const*)
(./bin/opt+0x13c9cd5)
#20 0x00000000013c9b21 polly::SCEVAffinator::getPwAff(llvm::SCEV const*,
llvm::BasicBlock*) (./bin/opt+0x13c9b21)
#21 0x000000000139892b polly::Scop::getPwAff(llvm::SCEV const*,
llvm::BasicBlock*, bool) (./bin/opt+0x139892b)
#22 0x0000000001397a1c
polly::MemoryAccess::buildAccessRelation(polly::ScopArrayInfo const*)
(./bin/opt+0x1397a1c)
#23 0x000000000139aba0 polly::ScopStmt::init(llvm::LoopInfo&)
(./bin/opt+0x139aba0)
#24 0x00000000013a4fac polly::Scop::init(llvm::AAResults&,
llvm::AssumptionCache&, llvm::DominatorTree&, llvm::LoopInfo&)
(./bin/opt+0x13a4fac)
#25 0x00000000013b0386 polly::ScopBuilder::buildScop(llvm::Region&,
llvm::AssumptionCache&) (./bin/opt+0x13b0386)
#26 0x00000000013b05d6 polly::ScopBuilder::ScopBuilder(llvm::Region*,
llvm::AssumptionCache&, llvm::AAResults&, llvm::DataLayout const&,
llvm::DominatorTree&, llvm::LoopInfo&, polly::ScopDetection&,
llvm::ScalarEvolution&) (./bin/opt+0x13b05d6)
#27 0x00000000013b0c34 polly::ScopInfoRegionPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&) (./bin/opt+0x13b0c34)
#28 0x0000000000981d63 llvm::RGPassManager::runOnFunction(llvm::Function&)
(./bin/opt+0x981d63)
#29 0x0000000000d76954 llvm::FPPassManager::runOnFunction(llvm::Function&)
(./bin/opt+0xd76954)
#30 0x0000000000d76b9b llvm::FPPassManager::runOnModule(llvm::Module&)
(./bin/opt+0xd76b9b)
#31 0x0000000000d770c3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(./bin/opt+0xd770c3)
#32 0x00000000005d5b7e main (./bin/opt+0x5d5b7e)
#33 0x00007f34a64de76d __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2176d)
#34 0x00000000005c7b55 _start (./bin/opt+0x5c7b55)
Stack dump:


The test case loop contains nonaffine loop bound condition, %var5 = sdiv i32
%var3, 64

The memory access within this nonaffine loop should be visible to llvm, but
invisible/boxed for polly.

This test case represent cases of single dimension loop, for multi dimension
loop, similar issues are expected.

-- 
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/20160621/e23dfb9c/attachment-0001.html>


More information about the llvm-bugs mailing list