[llvm-bugs] [Bug 36032] New: After r313012, Assertion failed: (ExitCount != SE.getCouldNotCompute() && "Invalid loop count"), function generateOverflowCheck, file lib/Analysis/ScalarEvolutionExpander.cpp, line 2126.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 21 12:54:30 PST 2018


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

            Bug ID: 36032
           Summary: After r313012, Assertion failed: (ExitCount !=
                    SE.getCouldNotCompute() && "Invalid loop count"),
                    function generateOverflowCheck, file
                    lib/Analysis/ScalarEvolutionExpander.cpp, line 2126.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org

As reported in https://bugs.freebsd.org/225345, building the FreeBSD
games/scummvm port for AArch64 with clang 6.0.0 results in an assertion:

Assertion failed: (ExitCount != SE.getCouldNotCompute() && "Invalid loop
count"), function generateOverflowCheck, file
/usr/local/poudriere/jails/head-arm64/usr/src/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp,
line 2152.

This assertion still occurs with trunk r322755, and bisection shows it has
regressed with https://reviews.llvm.org/rL313012 ("[LAA] Allow more run-time
alias checks by coercing pointer expressions to AddRecExprs") by Silviu
Baranga.

Minimized test case:

// clang -cc1 -triple aarch64-- -S -O1 -vectorize-loops graphics-minimized.cpp
struct {
  void *a();
} b;
char c[6];
void d() {
  unsigned char *e = (unsigned char *)b.a();
  unsigned short f;
  for (;;) {
    for (unsigned g; g < 4; g++)
      e[g] = c[g + f];
    f += 4;
  }
}

Note that -vectorize-loops is essential for reproducing the assertion.

-- 
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/20180121/ddce7956/attachment.html>


More information about the llvm-bugs mailing list