<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 - Inlining introduces illegal ptrtoint"
href="https://bugs.llvm.org/show_bug.cgi?id=46737">46737</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inlining introduces illegal ptrtoint
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Transformation Utilities
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>yyc1992@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Bugpoint reduced IR:
```
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "text"
target datalayout =
"e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64-ni:10:11:12:13"
target triple = "armv7l-unknown-linux-gnueabihf"
define void @julia_show_tuple_as_call_23179() local_unnamed_addr {
top:
br i1 undef, label %L16.lr.ph, label %L51
L16.lr.ph: ; preds = %top
unreachable
L51: ; preds = %top
%0 = addrspacecast [2 x {} addrspace(10)*]* undef to [2 x {} addrspace(10)*]
addrspace(11)*
call fastcc void @julia_show_signature_function_32381([2 x {} addrspace(10)*]
addrspace(11)* nocapture readonly %0)
ret void
}
define dso_local fastcc void @julia_show_signature_function_32381([2 x {}
addrspace(10)*] addrspace(11)* nocapture nonnull readonly align 4
dereferenceable(8) %0) unnamed_addr {
top:
%1 = bitcast [2 x {} addrspace(10)*] addrspace(11)* %0 to i64 addrspace(11)*
ret void
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"Debug Info Version", i32 3}
```
reproducible with `opt bugpoint-reduced-simplified.ll -inline`.
Inlining produces
```
define void @julia_show_tuple_as_call_23179() local_unnamed_addr {
top:
br i1 undef, label %L16.lr.ph, label %L51
L16.lr.ph: ; preds = %top
unreachable
L51: ; preds = %top
%0 = addrspacecast [2 x {} addrspace(10)*]* undef to [2 x {} addrspace(10)*]
addrspace(11)*
%ptrint = ptrtoint [2 x {} addrspace(10)*] addrspace(11)* %0 to i32
%maskedptr = and i32 %ptrint, 3
%maskcond = icmp eq i32 %maskedptr, 0
call void @llvm.assume(i1 %maskcond)
%1 = bitcast [2 x {} addrspace(10)*] addrspace(11)* %0 to i64 addrspace(11)*
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>