<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 - InstCombine should correctly propagate alignment"
href="https://bugs.llvm.org/show_bug.cgi?id=44543">44543</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>InstCombine should correctly propagate alignment
</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>All
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>juneyoung.lee@sf.snu.ac.kr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23016" name="attach_23016" title="input.ll">attachment 23016</a> <a href="attachment.cgi?id=23016&action=edit" title="input.ll">[details]</a></span>
input.ll
```
$ cat input.ll
target datalayout = "p:64:64:64-i64:32:32"
define i64* @test1(i8* %x) {
entry:
%p = bitcast i8* %x to i64*
%b1 = load i64, i64* %p
%p2 = inttoptr i64 %b1 to i64*
ret i64* %p2
}
$ opt -instcombine input.ll -S -o -
target datalayout = "p:64:64:64-i64:32:32"
define i64* @test1(i8* %x) {
entry:
%0 = bitcast i8* %x to i64**
%b11 = load i64*, i64** %0, align 8
ret i64* %b11
}
```
The updated load should have align 4 because data layout says i64 has 4-bytes
alignment.</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>