<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - [InstCombineCalls] Prove callsite args constant to improve inlining decisions."
href="https://bugs.llvm.org/show_bug.cgi?id=34337">34337</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[InstCombineCalls] Prove callsite args constant to improve inlining decisions.
</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>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcrosier@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>In InstCombineCalls::visitCallSite, we mark parameters that are known to be
non-null in order to improve the efficacy of the inline cost model. We should
also be able to prove arguments as constant in a similar way (i.e., see
ValueTracking isKnownNonNullAt()).
We should be able to catch things like the following:
; RUN: opt < %s -instcombine -S | FileCheck %s
declare void @dummy(i32*)
declare void @dummy2(i32)
define void @test1(i32* %a) {
entry:
%cond1 = icmp eq i32* %a, null
br i1 %cond1, label %taken, label %end
taken:
call void @dummy(i32* %a)
ret void
end:
ret void
}
define void @test2(i32* %a) {
entry:
%cond1 = icmp ne i32* %a, null
br i1 %cond1, label %taken, label %end
taken:
ret void
end:
call void @dummy(i32* %a)
ret void
}
define void @test3(i32 %a) {
entry:
%cond1 = icmp eq i32 %a, 3
br i1 %cond1, label %taken, label %end
taken:
call void @dummy2(i32 %a)
ret void
end:
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>