[llvm-bugs] [Bug 27930] New: IndVarSimplify.cpp:2231: virtual bool (anonymous namespace)::IndVarSimplify::runOnLoop(llvm::Loop *, llvm::LPPassManager &): Assertion `L->isRecursivelyLCSSAForm(*DT) && "Indvars did not preserve LCSSA!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 29 15:19:00 PDT 2016


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

            Bug ID: 27930
           Summary: IndVarSimplify.cpp:2231: virtual bool (anonymous
                    namespace)::IndVarSimplify::runOnLoop(llvm::Loop *,
                    llvm::LPPassManager &): Assertion
                    `L->isRecursivelyLCSSAForm(*DT) && "Indvars did not
                    preserve LCSSA!"' failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: regehr at cs.utah.edu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

regehr at higgs:~/test/reduce_crash_433814$ clang -v
clang version 3.9.0 (trunk 271188)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/regehr/llvm-install/bin
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.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/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.1.1
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
regehr at higgs:~/test/reduce_crash_433814$ cat small.c
int fn2(int, int, int);
int fn3(int, int);
int a, e, g;
int b[0];
char c, d;
short f;
void fn1() {
  int h;
  short i;
  for (;;) {
    i = 0;
    for (; i <= 3; i++) {
      for (; c; c++) {
        d = h;
        h = fn2(0, f | b[i + 1], d);
      }
      for (; c; fn3(c, 0))
        ;
      if (a)
        break;
    }
    g = 1;
    for (; g; g--)
      for (; e; e++)
        ;
  }
}
regehr at higgs:~/test/reduce_crash_433814$ clang small.c -c -O
clang-3.9: ../lib/Transforms/Scalar/IndVarSimplify.cpp:2231: virtual bool
(anonymous namespace)::IndVarSimplify::runOnLoop(llvm::Loop *,
llvm::LPPassManager &): Assertion `L->isRecursivelyLCSSAForm(*DT) && "Indvars
did not preserve LCSSA!"' failed.
#0 0x00000000010c7338 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/regehr/llvm-install/bin/clang-3.9+0x10c7338)
#1 0x00000000010c7a67 SignalHandler(int)
(/home/regehr/llvm-install/bin/clang-3.9+0x10c7a67)
#2 0x00007f548a8e5330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f5489afec37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f5489b02028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#5 0x00007f5489af7bf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#6 0x00007f5489af7ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#7 0x0000000000f832f6 (anonymous
namespace)::IndVarSimplify::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/home/regehr/llvm-install/bin/clang-3.9+0xf832f6)
#8 0x0000000001b029ae llvm::LPPassManager::runOnFunction(llvm::Function&)
(/home/regehr/llvm-install/bin/clang-3.9+0x1b029ae)
#9 0x0000000000cdf454 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/regehr/llvm-install/bin/clang-3.9+0xcdf454)
#10 0x0000000001ae1577 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/home/regehr/llvm-install/bin/clang-3.9+0x1ae1577)
#11 0x0000000000cdfb65 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/regehr/llvm-install/bin/clang-3.9+0xcdfb65)
#12 0x0000000001237573 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) (/home/regehr/llvm-install/bin/clang-3.9+0x1237573)
#13 0x0000000001982c0d
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/regehr/llvm-install/bin/clang-3.9+0x1982c0d)
#14 0x0000000001d9cd76 clang::ParseAST(clang::Sema&, bool, bool)
(/home/regehr/llvm-install/bin/clang-3.9+0x1d9cd76)
#15 0x0000000001620e25 clang::FrontendAction::Execute()
(/home/regehr/llvm-install/bin/clang-3.9+0x1620e25)
#16 0x00000000015e76c1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/regehr/llvm-install/bin/clang-3.9+0x15e76c1)
#17 0x00000000016bcaf7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/regehr/llvm-install/bin/clang-3.9+0x16bcaf7)
#18 0x00000000006a3d2c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/regehr/llvm-install/bin/clang-3.9+0x6a3d2c)
#19 0x00000000006a299d main (/home/regehr/llvm-install/bin/clang-3.9+0x6a299d)
#20 0x00007f5489ae9f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#21 0x000000000069f792 _start
(/home/regehr/llvm-install/bin/clang-3.9+0x69f792)
Stack dump:
0.    Program arguments: /home/regehr/llvm-install/bin/clang-3.9 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb
-coverage-file /home/regehr/test/reduce_crash_433814/small.c -resource-dir
/home/regehr/llvm-install/bin/../lib/clang/3.9.0 -internal-isystem
/usr/local/include -internal-isystem
/home/regehr/llvm-install/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /home/regehr/test/reduce_crash_433814 -ferror-limit 19
-fmessage-length 119 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'small.c'.
4.    Running pass 'Loop Pass Manager' on function '@fn1'
5.    Running pass 'Induction Variable Simplification' on basic block
'%for.cond'
clang-3.9: error: unable to execute command: Aborted
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 271188)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/regehr/llvm-install/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /tmp/small-f9178b.c
clang-3.9: note: diagnostic msg: /tmp/small-f9178b.sh
clang-3.9: note: diagnostic msg: 

********************

-- 
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/20160529/97f86bd4/attachment.html>


More information about the llvm-bugs mailing list