<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/109123>109123</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Pointless jump to a jump
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Validark
</td>
</tr>
</table>
<pre>
My (large) program generates control flow like so:
```asm
...
je .LBB6_18
jmp .LBB6_112
.LBB6_84: ; this cannot be reached via the previous instruction, therefore it could be moved.
vpbroadcastb ymm7, byte ptr [rip + .LCPI6_30]
jmp .LBB6_13
.LBB6_85:
test r11, r11
cmove r10, rsi
...
```
```asm
...
jmp .LBB6_14
.Ltmp384:
.LBB6_13: ; This is only reachable via the jump in .LBB6_84
vbroadcasti128 ymm4, xmmword ptr [rip + .LCPI6_31]
vbroadcasti128 ymm3, xmmword ptr [rip + .LCPI6_32]
mov rsi, qword ptr [rsp + 152]
add r10, 64
add r11, 8
.LBB6_14:
mov rbx, rsi
add rsi, 8
...
```
It would be nice if there was a cleanup pass which merged all these weird cases
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVE9v-ygQ_TT4Mqpl8J84Bx-aVpEqdaUeVnut-DOxabHxAk6ab7_CTtImbbU_FGUgjxnevAfh3ut2QGxIuSHlY8Kn0FnX_MONVty9J8KqY_PXEQirDXctEraG0dnW8R5aHNDxgB6kHYKzBnbGHsDodwRvSX5PskeSnb-rbPlw3y-_QJqmp9lpvOES0-fNpnql9Q3aj19RyhZ4WdYFye-B5BsInfYg-TDYAALBIZcdKthrDqFDGB3utZ086MEHN8mg7UDYQ8Qc7qxD0AGknYyK2b3do7phuR-Fs1xJ7oOI62Pfr2IFcQwIY3BAyo3TIxC2gfT54eWpes0zUj6eqty0kV91UV5UO58W0IcYHaXxkBiucBkpgqPZjHp9jV4kvsj_P57c5n0V_8S4ODMO_ZjPun9tgeZnI_6ORmgPdjDHxQYuDF6MeJv6EfQAF_-uRb5orCmrZ5GL2OFH3x-sU7_pTD91_qFC_gcV2GeF0-jtfhaWPcC_V5l-yaTl9xyuFCyuzb5UxW_wbGp9JWDx7Q5EBvN28fGjy5dyC8v69n39aP5TgMP5mg9aIujd8gjgwD1wkAb5MI0wcu_h0GnZQY-uRQXcmLjTIxxQOwWSe_SJanK1ztc8wYauWFWVJWNV0jVMiQy52vG6pPWOCcVlvSupWuWqXmeqTHTDMlZka1rTjK2yKs2FYEysmORCMVkqUmTYc21SY_Z9al2baO8nbGi2pixPDBdo_PkPzDVx152YWk-KzGgf_Gde0MFg82L1EAx6v9zBYIHPs2RypulCGH10gG0J27Y6dJNIpe0J28Yyp3A3OvuGMhC2nbl4wrYnOvuG_RcAAP__hTR_iQ">