[llvm-bugs] [Bug 34459] New: opt crashes with "opt -inline -instcombine -adce -newgvn -gvn-hoist": Assertion `dominates(MD, U) && "Memory Def does not dominate it's uses"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Sep 4 08:36:50 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34459
Bug ID: 34459
Summary: opt crashes with "opt -inline -instcombine -adce
-newgvn -gvn-hoist": Assertion `dominates(MD, U) &&
"Memory Def does not dominate it's uses"' 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 312462)
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 -w -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ opt -inline -instcombine -adce -newgvn -gvn-hoist -o small-opt.bc small.bc
opt: /tmp/llvm-builder/llvm-source-trunk/lib/Analysis/MemorySSA.cpp:1715: void
llvm::MemorySSA::verifyDomination(llvm::Function&) const: Assertion
`dominates(MD, U) && "Memory Def does not dominate it's uses"' failed.
#0 0x0000000001e5966a (opt+0x1e5966a)
#1 0x0000000001e573de (opt+0x1e573de)
#2 0x0000000001e57552 (opt+0x1e57552)
#3 0x00007f4159b0d390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f415887f428 gsignal
/build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f415888102a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f4158877bd7 __assert_fail_base
/build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
#7 0x00007f4158877c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x000000000142c9a7 (opt+0x142c9a7)
#9 0x000000000142c9e9 (opt+0x142c9e9)
#10 0x000000000193c509 (opt+0x193c509)
#11 0x000000000194023a (opt+0x194023a)
#12 0x000000000137596e (opt+0x137596e)
#13 0x000000000193fe7d (opt+0x193fe7d)
#14 0x00000000006f30d6 (opt+0x6f30d6)
#15 0x00007f415886a830 __libc_start_main
/build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
#16 0x0000000000765a09 (opt+0x765a09)
Stack dump:
0. Program arguments: opt -inline -instcombine -adce -newgvn -gvn-hoist -o
small-opt.bc small.bc
1. Running pass 'CallGraph Pass Manager' on module 'small.bc'.
Aborted (core dumped)
$
---------------------------------------------------
int a, b, c, e, f, g, h, i, j, k;
char d;
int fn1 (int l)
{
return a ? l : a;
}
char fn2 ()
{
return b ? d : b;
}
int fn3 (int l)
{
return l ? l : c;
}
int fn4 ()
{
return e ? e : f;
}
void fn5 ()
{
while (j)
;
if (1 | ((g || fn1 (fn2 () > i)) > 0))
;
else
{
L:
fn3 ((h && 0, fn4 ()));
if (k)
goto L;
}
}
int main ()
{
fn5 ();
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/97008212/attachment.html>
More information about the llvm-bugs
mailing list