[llvm-bugs] [Bug 33963] New: opt crashes with "opt -sroa -adce -lcssa -indvars": Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) && "Requested to preserve LCSSA, but it's already broken."' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 27 00:43:19 PDT 2017


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

            Bug ID: 33963
           Summary: opt crashes with "opt -sroa -adce -lcssa -indvars":
                    Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) &&
                    "Requested to preserve LCSSA, but it's already
                    broken."' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: su at cs.ucdavis.edu
                CC: llvm-bugs at lists.llvm.org

$ clang -v
clang version 6.0.0 (trunk 309139)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang -O3 -mllvm -disable-llvm-optzns -w -c -emit-llvm -o small.bc small.c
$ opt -sroa -adce -lcssa -indvars -o small-opt.bc small.bc
opt:
/tmp/llvm-builder/llvm-source-trunk/lib/Transforms/Utils/LoopSimplify.cpp:697:
bool llvm::simplifyLoop(llvm::Loop*, llvm::DominatorTree*, llvm::LoopInfo*,
llvm::ScalarEvolution*, llvm::AssumptionCache*, bool): Assertion
`L->isRecursivelyLCSSAForm(*DT, *LI) && "Requested to preserve LCSSA, but it's
already broken."' failed.
#0 0x0000000001e69d9a (opt+0x1e69d9a)
#1 0x0000000001e67b0e (opt+0x1e67b0e)
#2 0x0000000001e67c82 (opt+0x1e67c82)
#3 0x00007ffa6390b390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007ffa6267d428 gsignal
/build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007ffa6267f02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007ffa62675bd7 __assert_fail_base
/build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
#7 0x00007ffa62675c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000001eeb3b1 (opt+0x1eeb3b1)
#9 0x0000000001eeb62f (opt+0x1eeb62f)
#10 0x000000000195aa23 (opt+0x195aa23)
#11 0x000000000195aaec (opt+0x195aaec)
#12 0x000000000195a58d (opt+0x195a58d)
#13 0x00000000006dd75c (opt+0x6dd75c)
#14 0x00007ffa62668830 __libc_start_main
/build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
#15 0x0000000000749e49 (opt+0x749e49)
Stack dump:
0.      Program arguments: opt -sroa -adce -lcssa -indvars -o small-opt.bc
small.bc
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Canonicalize natural loops' on function '@f'
Aborted (core dumped)
$


------------------------------


int a, c, d;

void e (int b) {}

void f ()
{ 
  int g = 4;
  while (0)
    g = 0;
  while (0)
    { 
      int h;
      c && 6;
      if (h)
        continue;
    }
  while (0)
    a || 0;
  for (; 0; d)
    { 
      e (g);
      while (1)
        { 
          int i;
          if (f)
            continue;
        }
    }
}

int main ()
{ 
  f ();
  return 0;
}

-- 
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/20170727/902fff56/attachment-0001.html>


More information about the llvm-bugs mailing list