[llvm-bugs] [Bug 30954] New: [polly] Assertion `S->contains(Expr->getLoop()) && "Scop does not contain the loop referenced in this AddRec"'

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 8 15:34:47 PST 2016


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

            Bug ID: 30954
           Summary: [polly] Assertion `S->contains(Expr->getLoop()) &&
                    "Scop does not contain the loop referenced in this
                    AddRec"'
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: efriedma at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Testcase (opt -polly-process-unprofitable -polly-scops):

target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv7--linux-android"

define void @f(float* %pa, i32* nocapture readonly %lda) {
entry:
  switch i8 undef, label %if.then [
    i8 78, label %if.else
    i8 110, label %if.else
    i8 84, label %if.else
    i8 116, label %if.else
    i8 67, label %if.else
    i8 99, label %if.else
  ]

if.then:
  unreachable

if.else:
  switch i8 undef, label %polly.stmt.if.then82 [
    i8 78, label %polly.stmt.if.end83.region_exiting
    i8 110, label %polly.stmt.if.end83.region_exiting
  ]

for.cond:
  %j.0 = phi i32 [ 0, %polly.stmt.if.end83.region_exiting ], [ %inc, %if.end204
]
  br i1 undef, label %for.body, label %for.cond.cleanup

for.cond.cleanup:
  unreachable

for.body:
  %.sroa.speculated592 = select i1 undef, i32 undef, i32 0
  %sub119 = sub nsw i32 0, %j.0
  %add120 = add nsw i32 %sub119, %.sroa.speculated592
  switch i8 undef, label %if.else192 [
    i8 78, label %if.then147.critedge
    i8 110, label %if.then147.critedge
    i8 67, label %0
    i8 99, label %0
    i8 84, label %if.then181
    i8 116, label %if.then181
  ]

if.then147.critedge:
  br label %if.end204

; <label>:0:
  unreachable

if.then181:
  %mul.i.i.i.i.i442 = mul nsw i32 %2, %j.0
  %arrayidx.i.i.i.i.i443 = getelementptr inbounds float, float* %pa, i32
%mul.i.i.i.i.i442
  %arrayidx.i.i.i.i.i.i432 = getelementptr inbounds float, float*
%arrayidx.i.i.i.i.i443, i32 %add120
  br label %if.else.i.i411

if.else.i.i411:
  %1 = load float, float* %arrayidx.i.i.i.i.i.i432, align 4
  br i1 false, label %for.body53.i.i420.preheader, label %X

for.body53.i.i420.preheader:
  br label %X

X:
  unreachable

if.else192:
  unreachable

if.end204:
  %inc = add nsw i32 %j.0, 1
  br label %for.cond

polly.stmt.if.then82:
  br label %polly.stmt.if.end83.region_exiting

polly.stmt.if.end83.region_exiting:
  %2 = load i32, i32* %lda, align 4
  br label %for.cond
}


Stack trace:
opt: [src]/tools/polly/lib/Support/SCEVAffinator.cpp:417: PWACtx
polly::SCEVAffinator::visitAddRecExpr(const llvm::SCEVAddRecExpr *): Assertion
`S->contains(Expr->getLoop()) && "Scop does not contain the loop referenced in
this AddRec"' failed.
#0 0x0000000002a7315c llvm::sys::PrintStackTrace(llvm::raw_ostream&)
[src]/lib/Support/Unix/Signals.inc:402:11
#1 0x0000000002a736b9 PrintStackTraceSignalHandler(void*)
[src]/lib/Support/Unix/Signals.inc:466:1
#2 0x0000000002a705c7 llvm::sys::RunSignalHandlers()
[src]/lib/Support/Signals.cpp:45:5
#3 0x0000000002a73a40 SignalHandler(int)
[src]/lib/Support/Unix/Signals.inc:256:1
#4 0x00007f0980208330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007f097ebf9c37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007f097ebfd028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007f097ebf2bf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#8 0x00007f097ebf2ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000002f14c72
polly::SCEVAffinator::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
[src]/tools/polly/lib/Support/SCEVAffinator.cpp:416:5
#10 0x0000000002f15f1b llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
[src]/include/llvm/Analysis/ScalarEvolutionExpressions.h:457:16
#11 0x0000000002f1391b polly::SCEVAffinator::visit(llvm::SCEV const*)
[src]/tools/polly/lib/Support/SCEVAffinator.cpp:246:12
#12 0x0000000002f14796 polly::SCEVAffinator::visitAddExpr(llvm::SCEVAddExpr
const*) [src]/tools/polly/lib/Support/SCEVAffinator.cpp:386:16
#13 0x0000000002f15ebb llvm::SCEVVisitor<polly::SCEVAffinator,
std::__1::pair<isl_pw_aff*, isl_set*> >::visit(llvm::SCEV const*)
[src]/include/llvm/Analysis/ScalarEvolutionExpressions.h:451:16
#14 0x0000000002f1391b polly::SCEVAffinator::visit(llvm::SCEV const*)
[src]/tools/polly/lib/Support/SCEVAffinator.cpp:246:12
#15 0x0000000002f135f7 polly::SCEVAffinator::getPwAff(llvm::SCEV const*,
llvm::BasicBlock*) [src]/tools/polly/lib/Support/SCEVAffinator.cpp:146:10
#16 0x0000000002e9c5ab polly::Scop::getPwAff(llvm::SCEV const*,
llvm::BasicBlock*, bool) [src]/tools/polly/lib/Analysis/ScopInfo.cpp:3920:15
#17 0x0000000002e99834 polly::MemoryAccess::getPwAff(llvm::SCEV const*)
[src]/tools/polly/lib/Analysis/ScopInfo.cpp:943:17
#18 0x0000000002e9a207
polly::MemoryAccess::buildAccessRelation(polly::ScopArrayInfo const*)
[src]/tools/polly/lib/Analysis/ScopInfo.cpp:839:17
#19 0x0000000002e9d12d polly::ScopStmt::buildAccessRelations()
[src]/tools/polly/lib/Analysis/ScopInfo.cpp:1116:29
#20 0x0000000002e9f272 polly::ScopStmt::init(llvm::LoopInfo&)
[src]/tools/polly/lib/Analysis/ScopInfo.cpp:1500:3
#21 0x0000000002ea9513 polly::Scop::init(llvm::AAResults&,
llvm::AssumptionCache&, llvm::DominatorTree&, llvm::LoopInfo&)
[src]/tools/polly/lib/Analysis/ScopInfo.cpp:3134:5
#22 0x0000000002ee718d polly::ScopBuilder::buildScop(llvm::Region&,
llvm::AssumptionCache&) [src]/tools/polly/lib/Analysis/ScopBuilder.cpp:667:1
#23 0x0000000002ee745b polly::ScopBuilder::ScopBuilder(llvm::Region*,
llvm::AssumptionCache&, llvm::AAResults&, llvm::DataLayout const&,
llvm::DominatorTree&, llvm::LoopInfo&, polly::ScopDetection&,
llvm::ScalarEvolution&) [src]/tools/polly/lib/Analysis/ScopBuilder.cpp:681:3
#24 0x0000000002eb1927 polly::ScopInfoRegionPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&) [src]/tools/polly/lib/Analysis/ScopInfo.cpp:4342:15
#25 0x0000000001b22441 llvm::RGPassManager::runOnFunction(llvm::Function&)
[src]/lib/Analysis/RegionPass.cpp:97:20
#26 0x000000000226e4bf llvm::FPPassManager::runOnFunction(llvm::Function&)
[src]/lib/IR/LegacyPassManager.cpp:1509:23
#27 0x000000000226e7d5 llvm::FPPassManager::runOnModule(llvm::Module&)
[src]/lib/IR/LegacyPassManager.cpp:1530:16
#28 0x000000000226f3f3 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
[src]/lib/IR/LegacyPassManager.cpp:1586:23
#29 0x000000000226ea96 llvm::legacy::PassManagerImpl::run(llvm::Module&)
[src]/lib/IR/LegacyPassManager.cpp:1689:16
#30 0x000000000226fef1 llvm::legacy::PassManager::run(llvm::Module&)
[src]/lib/IR/LegacyPassManager.cpp:1720:3
#31 0x00000000008bbfb6 main [src]/tools/opt/opt.cpp:723:3
#32 0x00007f097ebe4f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#33 0x00000000008928d4 _start ([bin]/bin/opt+0x8928d4)
Stack dump:
0.      Program arguments: [bin]/bin/opt -polly-process-unprofitable
-polly-scops single-reduced.ll
1.      Running pass 'Function Pass Manager' on module 'single-reduced.ll'.
2.      Running pass 'Region Pass Manager' on function '@f'
3.      Running pass 'Polly - Create polyhedral description of Scops' on basic
block '%if.else.i.i411'
Aborted

-- 
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/20161108/545bd837/attachment.html>


More information about the llvm-bugs mailing list