<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/104591>104591</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Simplify load+inttoptr with constant i64
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
r00t0s
</td>
</tr>
</table>
<pre>
Hello, I'm trying to simplify all constant like in the title
Example code -> https://godbolt.org/z/MrhWbY5Ms
This code is simplified when I comment another "store" instruction to the same value pointer to get this result
load i64, ptr inttoptr (i64 4217185 to ptr)
But when I uncommed store, it's not simplified -> https://godbolt.org/z/qvY5sv7r6
Is here any pass what optimize constants from load?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkkmP2zAMhX-NfCEmkOlFycGH2YzOYU4tUMxRselYrSy5Ip008-sLJ7MUPfViCyAe-fHxWWZ3CESNqu5U9ZDZRcaYmqS1aM72sT83X8j7qPAenhSaCSSdXTiARGA3zd4NZ7DeQxcDiw0C3v0kcAFkJBAnnpR-UPr2-n38bafZE3SxJ7hRxSOMIjOr4lZhq7A9xH4fvWxiOihsXxW2z2n8vn-pnvna4Nvo-Kp2_A7gqIfTSAGeoIvTREHAhigjJVCILDGRQgQXWNLSiYthpV_52E4ER-sXgjm6IJTWyoEEZJ2TiBcv18E-2h5cXa5GzJLABZG4PhRuXV1CibnJt9WqnyUp3F1ld4u8sy3hQtfDG9E9OFFoGEKUv1f5L1t-HV8qPppUX8c8MYyUCGw4w2yZ4TRagTiLm9wrfRyHYUhxgnUXVbRZ3xT9rtjZjJrcYLHNq7Kus7GhkkgPAxmNJqdtsR3IVmawvd3m2Jkucw1qLPU2r_OiMGW9GazJbV5aPZSmy7VRpabJOr_x_jit2JljXqjJdVnt8szbPXm-ZA4x0AkuVYW4RjA1q-hmvxxYldo7Fv5sc0lU8_U9eZdN8O7jGCcn42cUXV1mS_LNP2Y6GZf9pouTwnZt_Pa7mVP8QZ0obC84rLB94z02-CcAAP__QTEIQA">