[llvm-bugs] [Bug 34135] New: [NewGVN] Assertion `BeforeCC->isEquivalentTo(AfterCC) && "Value number changed after main loop completed!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 9 07:32:24 PDT 2017


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

            Bug ID: 34135
           Summary: [NewGVN] Assertion `BeforeCC->isEquivalentTo(AfterCC)
                    && "Value number changed after main loop completed!"'
                    failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: mcrosier at codeaurora.org
                CC: llvm-bugs at lists.llvm.org

test.cpp:
template <class E> class A {
public:
  E* ep;
  void add(const E& e);
};
class OJ;
typedef OJ* OJpt;
typedef OJpt* OJppt;
class OJ {
public:
  signed int m;
  A <OJpt> nb1ar;
};
class foo {
  void test();
public:
  OJppt regionp;
  inline OJpt& regp(signed int x, signed int y) {
    return regionp[x+y*sizex];
  }
  signed int maxx,maxy;
  signed int sizex,sizey;
};
void foo::test() {
  signed int x,y,x1,y1;
  OJpt regionp,region2p;
  for (y=1; y<=maxy-1; y++)
    for (x=1; x<=maxx-1; x++) {
      for (y1=y-1; y1<=y+1; y1++)
        for (x1=x-1; x1<=x+1; x1++) {
          region2p=regp(x1,y1);
          if (region2p)
            if (regionp!=region2p) {
              region2p->nb1ar.add(regionp);
            }
        }
    }
}

Reproduce with:
clang -O2 -mllvm -enable-newgvn ./test.cpp

-- 
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/20170809/d15dc02f/attachment.html>


More information about the llvm-bugs mailing list