<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/72927>72927</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Miscompilation - results change at -O1
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ericastor
</td>
</tr>
</table>
<pre>
Demonstration: https://godbolt.org/z/jMseT9fW7
LLVM IR that seems to miscompile:
```
define i64 @__sample__main(i8 %x1, ptr %output_ptrs) {
entry:
%0 = zext i8 %x1 to i256
%1 = shl nuw i256 1, %0
%2 = load ptr, ptr %output_ptrs, align 8
%3 = zext i256 %1 to i1024
%4 = shl nsw nuw i1024 %3, 8
%5 = zext i8 %x1 to i1024
%6 = or i1024 %4, %5
store i1024 %6, ptr %2, align 16
ret i64 0
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0k91q4zAQhZ9GvhkSpJH_cuGLtsGw0LKwLLuXQbYnsYpsGUne_jz9IiVtQqEQYuQ5_uaMdKS816eZqGHFPSv2mVrDaF1DTvfKB-uyzg5vzZ4mO_vgVNB2ZvIOxhAWz-Qdw5Zhe7JDZ03YWndi2L4zbJ-fPP3eHf9WjO8Zvzv_Pz7-eYIfvyCMKoAnmjwEC5P2vZ0WbSjyzvKSX35pOdBRzwS6zIHl_HDwaloMHQ6T0jPDWtfAsHgVDB9gCS4u7BqWNRyW4DzDHbDq_kyiObi3zzYQpRyY3MM7vQb4AEVXGovyRiWSyo8G5vUlFSH1i4CLjGGBSWWsGqKR7_w8gDL6NEN9w5c3LiI8tYw2BMf82iC_2vAvZytRkAgRfIssvhnshhjflklm3ZWUXwYrPlQxB3StlzeD4XUc8blfjkI6rMvOsGr_5VizoZHDTu5URo2oOC-wQCmzsenqvjjWx6qgvJRVLmRJgxJSiWOZCyEp0w1ylEKg4JxXQm5533Hqirqs66PI1cByTpPSZmvMvykGMtPer9RUuMMqM6oj41PWEWd6gVRkiDH6ronfbLr15FnOjfbBXylBB0PN00dW00WADTjyqwke-lHNJwIVYPNTZKszzZcbosO4dtveTgzbCL08Nouzz9QHhm2y4hm2yer_AAAA__9L9gVX">