Open Quuxplusone opened 7 years ago
Bugzilla Link | PR34458 |
Status | NEW |
Importance | P enhancement |
Reported by | Zhendong Su (su@cs.ucdavis.edu) |
Reported on | 2017-09-04 08:30:08 -0700 |
Last modified on | 2017-12-12 01:32:10 -0800 |
Version | unspecified |
Hardware | PC All |
CC | ditaliano@apple.com, llvm-bugs@lists.llvm.org, simbuerg@fim.uni-passau.de, tobias@grosser.es |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Reduced (opt -polly-mse)
@global = external global i32, align 4
@global.1 = external global i32, align 4
define void @patatino() {
bb:
br label %bb1
bb1:
%tmp = phi i32 [ undef, %bb ], [ %tmp10, %bb15 ]
br label %bb5
bb5:
%tmp6 = icmp ne i32 %tmp, 0
br i1 %tmp6, label %bb5, label %bb9
bb9:
%tmp10 = phi i32 [ %tmp14, %bb12 ], [ %tmp, %bb5 ]
%tmp11 = icmp slt i32 %tmp10, 1
br i1 %tmp11, label %bb12, label %bb15
bb12:
store i32 1, i32* @global.1, align 4
%tmp14 = add nsw i32 %tmp10, 1
br label %bb9
bb15:
%tmp17 = load i32, i32* @global, align 4
br label %bb1
}
It crashes with the following assertion:
opt: /home/davide/work/llvm-
polly/tools/polly/lib/Transform/MaximalStaticExpansion.cpp:439:
polly::ScopArrayInfo*
{anonymous}::MaximalStaticExpander::expandAccess(polly::Scop&,
polly::MemoryAccess*): Assertion `!UpperBound.is_null() && UpperBound.is_pos()
&& !UpperBound.is_nan() && "The upper bound is not a positive integer."' failed.
I think I'll try to debug this but I'm not superfamiliar with polly so, Tobias,
if you have ideas, please jump in :)
Hi Davide,
this code was contributed
This code was contributed by Andreas' student. It seems we find a negative upper bound at a position this is not expected. Andreas any idea what is going on here?
Need to debug it, but I would have 2 first guesses:
1) Outermost statement dimension is unbounded. This should cause the
loop to be rejected from full expansion. If not, we lack a check.
2) Innermost statement dimension (c-loop) has the dimension's upper bound
at the value 0. AFAIK the implementation assumes a constant positive
upper bound.
I try to have a look in the evening.