[llvm-bugs] [Bug 36945] New: opt crashes with "opt -ipsccp -inline -sroa -early-cse-memssa -loop-rotate -licm -loop-vectorize -instcombine": Assertion `OrigLoop->isLoopInvariant(LCSSAPhi.getIncomingValue(0)) && "Incoming value isn't loop invariant"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 28 22:30:19 PDT 2018


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

            Bug ID: 36945
           Summary: opt crashes with "opt -ipsccp -inline -sroa
                    -early-cse-memssa -loop-rotate -licm -loop-vectorize
                    -instcombine": Assertion
                    `OrigLoop->isLoopInvariant(LCSSAPhi.getIncomingValue(0
                    )) && "Incoming value isn't loop invariant"' 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

$ clangpolly -v
clang version 7.0.0 (http://llvm.org/git/clang.git
9a41408814f37f4f864fb3e57aa01919b4d871d8) (llvm/trunk 328613)
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 -ipsccp -inline -sroa -early-cse-memssa -loop-rotate -licm
-loop-vectorize -instcombine -o small-opt.bc small.bc
optpolly:
/home/su/software/tmp/polly/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4335:
void llvm::InnerLoopVectorizer::fixLCSSAPHIs(): Assertion
`OrigLoop->isLoopInvariant(LCSSAPhi.getIncomingValue(0)) && "Incoming value
isn't loop invariant"' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x00000000021003ba (optpolly+0x21003ba)
#1 0x00000000020fe56e (optpolly+0x20fe56e)
#2 0x00000000020fe6d0 (optpolly+0x20fe6d0)
#3 0x00007f17ec689330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f17eb471c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f17eb475028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f17eb46abf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f17eb46aca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000002211e44 (optpolly+0x2211e44)
#9 0x000000000222e2d0 (optpolly+0x222e2d0)
#10 0x000000000222e985 (optpolly+0x222e985)
#11 0x0000000002239018 (optpolly+0x2239018)
#12 0x0000000002239a3f (optpolly+0x2239a3f)
#13 0x000000000223a0f6 (optpolly+0x223a0f6)
#14 0x0000000001be949b (optpolly+0x1be949b)
#15 0x000000000163e8c6 (optpolly+0x163e8c6)
#16 0x0000000001bea1aa (optpolly+0x1bea1aa)
#17 0x00000000008cf016 (optpolly+0x8cf016)
#18 0x00007f17eb45cf45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#19 0x0000000000944716 (optpolly+0x944716)
Stack dump:
0.      Program arguments: optpolly -ipsccp -inline -sroa -early-cse-memssa
-loop-rotate -licm -loop-vectorize -instcombine -o small-opt.bc small.bc 
1.      Running pass 'CallGraph Pass Manager' on module 'small.bc'.
2.      Running pass 'Loop Vectorization' on function '@f'
Aborted (core dumped)
$ 


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


int a, b;

static void c (int *d, int *e)
{
  for (a = 0; a < 21; a++)
    *e = *d;
  if (b)
    ;
}

void f ()
{
  int *g = &a;
  c (g, &b);
}

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/20180329/529dcda1/attachment-0001.html>


More information about the llvm-bugs mailing list