[LLVMbugs] [Bug 21585] New: [DependenceAnalysis] collectUpperBound triggers asserts

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 16 10:11:46 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21585

            Bug ID: 21585
           Summary: [DependenceAnalysis] collectUpperBound triggers
                    asserts
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: wujingyue at gmail.com
                CC: llvmbugs at cs.uiuc.edu, sebpop at gmail.com
    Classification: Unclassified

Created attachment 13354
  --> http://llvm.org/bugs/attachment.cgi?id=13354&action=edit
the test that triggers assertion failures

collectUpperBound assumes the type of the back edge count is no wider than the
desired type (T). However, this assumption does not hold at least in
strongSIVTest where the type of Delta may be narrower. 

In the attached test case, the back edge count is i64 100, but the Delta
(derived from i32 %i and i32 5) is of i32. 

define void @i32_subscript(i32* %a) {
entry:
  br label %for.body

for.body:
  %i = phi i32 [ 0, %entry ], [ %i.inc, %for.body ]
  %a.addr = getelementptr i32* %a, i32 %i
  %a.addr.2 = getelementptr i32* %a, i32 5
  %0 = load i32* %a.addr, align 4
  %1 = add i32 %0, 1
  store i32 %1, i32* %a.addr.2, align 4
  %i.inc = add nsw i32 %i, 1
  %i.inc.ext = sext i32 %i to i64
  %exitcond = icmp ne i64 %i.inc.ext, 100
  br i1 %exitcond, label %for.body, label %for.end

for.end:
  ret void
}

Note: this issue is similar to PR18082 in that both are caused by sort of type
mismatching. However, the type mismatch in PR18082 is caused by
removeMatchingExtensions, and this bug is not. 

Jingyue

-- 
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/20141116/b80657a3/attachment.html>


More information about the llvm-bugs mailing list