<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/121770>121770</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[JumpThreading] jump threading pass hangs
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:optimizations,
llvm:hang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dtcxzyw
</td>
</tr>
</table>
<pre>
Reproducer: https://godbolt.org/z/x6TPjPszv
```
; bin/opt -passes=jump-threading reduced.ll -S
define i32 @func_134(i1 %cmp274) {
entry:
br label %for.cond227
for.cond227: ; preds = %for.cond271.for.cond227_crit_edge, %for.cond227, %entry
br i1 false, label %for.cond227.for.cond271_crit_edge, label %for.cond227
for.cond227.for.cond271_crit_edge: ; preds = %for.cond227
br label %for.cond271
for.cond271: ; preds = %func_166.exit, %for.cond227.for.cond271_crit_edge
%call241.pn = phi { i64, i64 } [ %.fca.1.insert.i, %func_166.exit ], [ zeroinitializer, %for.cond227.for.cond271_crit_edge ]
br i1 %cmp274, label %for.body276, label %for.cond271.for.cond227_crit_edge
for.cond271.for.cond227_crit_edge: ; preds = %for.cond271
br label %for.cond227
for.body276: ; preds = %for.cond271
%l_2045.sroa.0.0 = extractvalue { i64, i64 } %call241.pn, 0
%cmp.i.i = icmp eq i64 %l_2045.sroa.0.0, 0
br i1 %cmp.i.i, label %func_166.exit, label %cond.false.i.i
cond.false.i.i: ; preds = %for.body276
br label %func_166.exit
func_166.exit: ; preds = %cond.false.i.i, %for.body276
%.fca.1.insert.i = insertvalue { i64, i64 } %call241.pn, i64 0, 1
br label %for.cond271
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMVU2P8jgM_jXuJSLKR9MOhx7Kizjs6dXu3Edpm0JG6ccm6SzDr18lDEspsAIhIRz78ePHTiyd0_teqQLEBsQ2kZM_DLZofH08ff-TVEPzXfypRjs0U60s8BIdvB8d8BLYDthuPzTVYDwe7B7Y7gRsd8zef3_-dqcvICVk5OdLSuAbVOke2G4YPVqN0jnlgG8_p25c-YNVstH9HlkVMjXYGLT6C0jZqFb3CmnOEKSknfr6g_IU2JumCJiou5HlKbA1gnwDpFS9t9-BHSkRqiwyslImOLaDxfXQN4zlgQwp5wZeopc-oYbRqsYh4Nsb1JziGeBHbbX_UM1eAfu1zH62nIn-sNQUtdK46P2IMZ7lucV-qb4n4fdVP68voj5RNKeLjDkN2PdgsXlZhtVR-3thnrAkZeyzNIalFI99RBsPOjQc6SwNQDpLEeRbBGITnHFbS0yx7p2yHutLqnl6BGIb7WKDTsoOutdeS6NPyr7KLEJcGzgbxkVbwiViefa4XU8HZynpE7eHQt905oV7cGH4ChgwYT4YSQV2dpCYYBI91dFbWfsvaSb1sDXzHoYDckGruxFrrCOKrrsRqb_PUXeJrmFzyUPwrbbLOfvvJNSB402LQbH-he2lp-ChSBcR7xS_oXPW_Mb0SPUFq-tIzrPcj_pZxPjn9U6Eg6jt_0zL-Y7n28WjnjQFb9Z8LRNV0JxnNBeU8-RQUPWW8oaTrG1FRjhZZ1VV1Uxm1ZsQ67ZKdMEIE4SSjKaCUY4b3jaNEIS26zrN2zdIieqkNtiYry7sl0Q7N6mCMprnJIkUXVxbjAUX4OUwet3pk_R66B0wBuzX9fAg-32wiW1ii2BbVdPeQUqMdt5ds3jtTVyHf0zd-H7ZSyC2KGwqdN1UYYOhgOqSyZpisRe1P0wVrocO2C4yOP-sRjt8qtoD28VyHLDdT0VfBfs3AAD__8yWNMQ">