<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - PHINode containing itself causes segfault in LLVM when compiling Blender OpenCL kernel with R600 backend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84232#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - PHINode containing itself causes segfault in LLVM when compiling Blender OpenCL kernel with R600 backend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84232">bug 84232</a>
from <span class="vcard"><a class="email" href="mailto:vitalif@yourcmc.ru" title="Vitaliy Filippov <vitalif@yourcmc.ru>"> <span class="fn">Vitaliy Filippov</span></a>
</span></b>
<pre>I've managed to make a reduced test case with a recursive PHI after
StructurizeCFG !!!
int main()
{
int i, j = 0;
while (j % 2)
{
if (j > 100)
j += 3;
else if (j > 50)
break;
}
return j;
}
clang-3.5 -S -emit-llvm test3.c
opt-3.5 -S -structurizecfg test3.ll > test3cfg.ll
Simple to visualise with graphviz:
( echo 'digraph G {'; perl -ne 'if (/\%(\S+) = phi/) { my $a = $1; print "$a ->
$_;\n" for /\[ \%([^\s,]+)/g; }' test3cfg.ll; echo '}' ) > test3cfg.dot
dot -Tsvg test3cfg.dot > test3cfg.svg
%21 and %26 phi's loop in the result.
Also there is a branch on constant in the end of test3cfg.ll:
br i1 false, label %14, label %Flow2</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>