<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/72293>72293</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Missed optimization for unnecessary shl/ashr pair in loop body
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:optimizations,
missed-optimization
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
XChy
</td>
</tr>
</table>
<pre>
Similar to #72212.
Alive2 proof: https://alive2.llvm.org/ce/z/ifqwPe
Missed example: https://godbolt.org/z/W6YT9EPMz
Real-world motivation: This snippet of IR is derived from FFmpeg/.../extr_aacdec_template.c_decode_drc_channel_exclusions.c.
Let me know if you can confirm that it's an optimization opportunity, please.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkkk9v2zwMhz-NfCFi2HTzxwcf8ravgQErUHQFtp0CWqZjbrKkSXLa9NMPToqt2y72geKjH8WHYpSjZW7U-j-1vstoTqMLzZfb8Zx1rj83n2QSQwGSA4XVFrHEXBV3qtjvjZwYwQfnBlXtYUzJR1XtFbYKW7pUc2NOU-7CUWGrWWH7qrCV4cfzA18h9xIj98AvNHnD_2KOru-cSW-Ipfvz5utT_f_D_esVcP0-MpnVswumh8klOVESZxfa0ygRohXvOYEb4MMjSISeg5y4hyG4Cdp28rzQ8zxX2PJLCgci3bM-JJ68ocS5PvSsXc-HPuiDHslaNgd-0WaO4mzMdf4-zUdOMDF8t-4ZZICzm0GTBe3sIGGCNFICSQq3EciC80kmeb1EBue9C2m2ks4Kb8Ebpsh51jdVX1c1ZdyUm7qud-tNWWZjU_Vlpzc1d7ui2xLjUBebirZEmklvWGfSYIFVWZY35a6ssM7LTdF3BXHZFUM90E7dFDyRmF-byiTGmZstYl1lhjo28SIH4nJCVfv3eaNCVHirEKfLIlfvi0ttfZeFZmlcdfMxqpvCSEzx92VJkuHmzYI_XmJwAWZrWXOMFM4QR7NoFccAniSAWDDOeVgszeZgmr_EkTTOXa7dpLC9JL_-Vj64b6zT4uEyaFTYXmb9GQAA__-wpAEQ">