[llvm-bugs] [Bug 37179] New: opt crashes with "-mem2reg -jump-threading -lcssa -indvars": Assertion `!L || L->contains(LI->getLoopFor(InsertPt->getParent()))' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 19 08:43:24 PDT 2018


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

            Bug ID: 37179
           Summary: opt crashes with "-mem2reg -jump-threading -lcssa
                    -indvars": Assertion `!L ||
                    L->contains(LI->getLoopFor(InsertPt->getParent()))'
                    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

Tested with trunk revision 330237. 

$ clangpolly -v
clang version 7.0.0 (http://llvm.org/git/clang.git
1c97f39bbba707ad1cdcef18ee2fc3aee318c45a) (llvm/trunk 330237)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.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.3
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.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.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.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -mem2reg -jump-threading -lcssa -indvars -o small-opt.bc small.bc
optpolly:
/home/su/software/tmp/polly/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:253:
llvm::Instruction* getInsertPointForUses(llvm::Instruction*, llvm::Value*,
llvm::DominatorTree*, llvm::LoopInfo*): Assertion `!L ||
L->contains(LI->getLoopFor(InsertPt->getParent()))' failed.
Stack dump:
0.      Program arguments: optpolly -mem2reg -jump-threading -lcssa -indvars -o
small-opt.bc small.bc
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Loop Pass Manager' on function '@main'
3.      Running pass 'Induction Variable Simplification' on basic block
'%while.cond1'
LLVMSymbolizer: error reading file: No such file or directory
#0 0x000000000215760a (optpolly+0x215760a)
#1 0x00000000021557be (optpolly+0x21557be)
#2 0x0000000002155920 (optpolly+0x2155920)
#3 0x00007f1f57e83330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f1f56c6bc37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f1f56c6f028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f1f56c64bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f1f56c64ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001f756c7 (optpolly+0x1f756c7)
#9 0x0000000001f78629 (optpolly+0x1f78629)
#10 0x0000000001f7b76b (optpolly+0x1f7b76b)
#11 0x0000000001f7d093 (optpolly+0x1f7d093)
#12 0x0000000001f7f421 (optpolly+0x1f7f421)
#13 0x0000000001727e2b (optpolly+0x1727e2b)
#14 0x0000000001c46b3b (optpolly+0x1c46b3b)
#15 0x0000000001c46bec (optpolly+0x1c46bec)
#16 0x0000000001c4784a (optpolly+0x1c4784a)
#17 0x00000000008d7713 (optpolly+0x8d7713)
#18 0x00007f1f56c56f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#19 0x000000000094ea86 (optpolly+0x94ea86)
Aborted (core dumped)
$


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


int a[1], b, c, d;

int main ()
{ 
  if (c)
    { 
      int e = 0, f = 1;
      while (1)
        { 
          while (e)
            a[e++] = 1;
          if (f)
            break;
          while (d++)
            while (b)
              ;
        }
    }
  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/20180419/4c681e29/attachment.html>


More information about the llvm-bugs mailing list