[llvm-bugs] [Bug 34466] New: opt crashes with "opt -polly-canonicalize -polly-dependences -adce -newgvn -gvn-hoist": Assertion `DT->dominates(NewBB, OldBB) && "invalid path"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Sep 4 12:44:39 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34466
Bug ID: 34466
Summary: opt crashes with "opt -polly-canonicalize
-polly-dependences -adce -newgvn -gvn-hoist":
Assertion `DT->dominates(NewBB, OldBB) && "invalid
path"' 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 6.0.0 (http://llvm.org/git/clang.git
c55c0db172fe48c0ee64bd86d2cb35c3e38f328b) (http://llvm.org/git/llvm.git
2677f9404b42bfb87e26402dc878fe08378c1129)
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 -polly-canonicalize -polly-dependences -adce -newgvn -gvn-hoist -o
small-opt.bc small.bc
optpolly:
/home/su/software/tmp/polly/llvm/lib/Transforms/Scalar/GVNHoist.cpp:401: bool
llvm::GVNHoist::hasEHOrLoadsOnPath(const llvm::Instruction*, llvm::MemoryDef*,
int&): Assertion `DT->dominates(NewBB, OldBB) && "invalid path"' failed.
#0 0x00000000038afd3c (optpolly+0x38afd3c)
#1 0x00000000038afdcd (optpolly+0x38afdcd)
#2 0x00000000038ae1e2 (optpolly+0x38ae1e2)
#3 0x00000000038af6bf (optpolly+0x38af6bf)
#4 0x00007fbddff60330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007fbdded48c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007fbdded4c028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007fbdded41bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007fbdded41ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x00000000035dfcae (optpolly+0x35dfcae)
#10 0x00000000035e0292 (optpolly+0x35e0292)
#11 0x00000000035e08de (optpolly+0x35e08de)
#12 0x00000000035e0d68 (optpolly+0x35e0d68)
#13 0x00000000035e24da (optpolly+0x35e24da)
#14 0x00000000035df4ca (optpolly+0x35df4ca)
#15 0x00000000035e2790 (optpolly+0x35e2790)
#16 0x00000000031940ee (optpolly+0x31940ee)
#17 0x0000000003194281 (optpolly+0x3194281)
#18 0x000000000319461c (optpolly+0x319461c)
#19 0x0000000003194d73 (optpolly+0x3194d73)
#20 0x0000000003194fb3 (optpolly+0x3194fb3)
#21 0x00000000017fe1b8 (optpolly+0x17fe1b8)
#22 0x00007fbdded33f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#23 0x00000000017d7ac9 (optpolly+0x17d7ac9)
Stack dump:
0. Program arguments: optpolly -polly-canonicalize -polly-dependences
-adce -newgvn -gvn-hoist -o small-opt.bc small.bc
1. Running pass 'Function Pass Manager' on module 'small.bc'.
2. Running pass 'Early GVN Hoisting of Expressions' on function '@fn1'
Aborted (core dumped)
$
---------------------------------
int a, b, c;
void fn1 ()
{
int e;
while (b)
if (e && a)
{
int f;
if (c)
while (f)
;
else
{
int g;
for (; 2;)
return;
}
}
}
int main ()
{
fn1 ();
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/20170904/0d4a4f8b/attachment-0001.html>
More information about the llvm-bugs
mailing list