[llvm-bugs] [Bug 31847] New: After r288115: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!"), function getAddRecExpr, file lib/Analysis/ScalarEvolution.cpp, line 2963.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 2 03:54:54 PST 2017


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

            Bug ID: 31847
           Summary: After r288115: Assertion failed:
                    (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr
                    operand is not loop-invariant!"), function
                    getAddRecExpr, file lib/Analysis/ScalarEvolution.cpp,
                    line 2963.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

>From https://bugs.freebsd.org/216718, building ffmpeg targeting Haswell or
higher results in an assertion:

Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand
is not loop-invariant!"), function getAddRecExpr, file
lib/Analysis/ScalarEvolution.cpp, line 2963.

This still happens with trunk r293557.  Bisection shows that this started
appearing after r288115:
------------------------------------------------------------------------
r288115 | abataev | 2016-11-29 09:21:14 +0100 (Tue, 29 Nov 2016) | 8 lines

[SLPVectorizer] Improved support of partial tree vectorization.

Currently SLP vectorizer tries to vectorize a binary operation and dies
immediately after unsuccessful the first unsuccessfull attempt. Patch
tries to improve the situation, trying to vectorize all binary
operations of all children nodes in the binop tree.

Differential Revision: https://reviews.llvm.org/D25517
------------------------------------------------------------------------

Reduced test case:
------------------------------------------------------------------------
/* clang -cc1 -triple i386 -S -target-cpu haswell -O2 -w -vectorize-loops
-vectorize-slp testcase.c */
typedef struct {
  int ncomp;
  int shift_w[]
} WaveformContext;
a, b, e, f, g;
*c;
WaveformContext d;
char *h;
fn1() {
  int i;
  unsigned char *j = 1, *k = 1;
  for (;;) {
    int l = (j[b >> d.shift_w[g + 1 % e]] - 128 >= 0
                 ? j[b >> d.shift_w[g + 1 % e]] - 128
                 : -j[b >> d.shift_w[g + 1 % e]]) +
            (k[b >> d.shift_w[g + 2 % e]] - 128 >= 0
                 ? k[b >> d.shift_w[g + 2 % e]] - 128
                 : -k[b >> d.shift_w[g + 2 % e]]);
    c = h - l;
    *c = 0;
    c = h + l;
    if (c)
      *c = 0;
    else
      *c = 1;
    h += 1;
  }
}
------------------------------------------------------------------------

-- 
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/20170202/7ccb408a/attachment.html>


More information about the llvm-bugs mailing list