<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - IPSCCP doesn't propagate structs"
href="https://llvm.org/bugs/show_bug.cgi?id=28533">28533</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>IPSCCP doesn't propagate structs
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Interprocedural Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>davide@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Testcase:
define internal { i32, i32 } @foo(i32 %A, i32 %B) {
%X = add i32 %A, %B
%Y = insertvalue { i32, i32 } undef, i32 %A, 0
%Z = insertvalue { i32, i32 } %Y, i32 %X, 1
ret { i32, i32 } %Z
}
define void @caller(i1 %C) {
%S1 = call { i32, i32 } @foo(i32 1, i32 2)
%X1 = extractvalue { i32, i32 } %S1, 0
%S2 = call { i32, i32 } @foo(i32 3, i32 4)
%X2 = extractvalue { i32, i32 } %S2, 0
%Z = add i32 %X1, %X2
ret void
}
[davide@localhost build-clang]$ ./bin/opt ./bin/patatellomio.ll -S -ipsccp
; ModuleID = './bin/patatellomio.ll'
source_filename = "./bin/patatellomio.ll"
define internal { i32, i32 } @foo(i32 %A, i32 %B) {
%X = add i32 %A, %B
%Y = insertvalue { i32, i32 } undef, i32 %A, 0
%Z = insertvalue { i32, i32 } %Y, i32 %X, 1
ret { i32, i32 } %Z
}
define void @caller(i1 %C) {
%S1 = call { i32, i32 } @foo(i32 1, i32 2)
%X1 = extractvalue { i32, i32 } %S1, 0
%S2 = call { i32, i32 } @foo(i32 3, i32 4)
%X2 = extractvalue { i32, i32 } %S2, 0
%Z = add i32 %X1, %X2
ret void
}
define internal { i32, i32 } @foo(i32 %A, i32 %B) {
%X = add i32 %A, %B
%Y = insertvalue { i32, i32 } undef, i32 %A, 0
%Z = insertvalue { i32, i32 } %Y, i32 %X, 1
ret { i32, i32 } %Z
}
define void @caller(i1 %C) {
%S1 = call { i32, i32 } @foo(i32 1, i32 2)
%S2 = call { i32, i32 } @foo(i32 3, i32 4)
%Z = add i32 1, 3
ret void
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>