<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57186>57186</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
IPSCCP pass can't reach a fixed-point when conditions have dependency
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bcl5980
</td>
</tr>
</table>
<pre>
https://alive2.llvm.org/ce/z/FCT5eJ
```
define void @src(i1 %a, i1 %b) {
entry:
br i1 %a, label %a.true_b.false, label %a.false
a.false: ; preds = %entry
br i1 %b, label %b.true, label %if.end
b.true: ; preds = %a.false
br i1 %b, label %if.end, label %a.true_b.false
a.true_b.false: ; preds = %b.true, %entry
br i1 %a, label %if.end, label %if.then
if.then: ; preds = %a.true_b.false
call void @use()
br label %if.end
if.end: ; preds = %if.then, %a.true_b.false, %b.true, %a.false
ret void
}
declare void @use()
```
First time SCCPSolver's log:
```
markOverdefined: i1 %a
markOverdefined: i1 %b
Popped off OI-WL: i1 %b
Popped off OI-WL: i1 %a
Marking Block Executable: a.true_b.false
Marking Block Executable: a.false
Popped off BBWL:
a.false: ; preds = %entry
%b.0 = call i1 @llvm.ssa.copy.i1(i1 %b)
br i1 %b, label %b.true, label %if.end
Merged constantrange<-1, 0> into %b.0 = call i1 @llvm.ssa.copy.i1(i1 %b) : constantrange<-1, 0>
Marking Block Executable: b.true
Marking Block Executable: if.end
Popped off BBWL:
if.end: ; preds = %if.then, %a.true_b.false, %b.true, %a.false
ret void
Popped off BBWL:
b.true: ; preds = %a.false
br i1 %b.0, label %if.end, label %a.true_b.false
Marking Edge Executable: b.true -> if.end
Popped off BBWL:
a.true_b.false: ; preds = %b.true, %entry
br i1 %a, label %if.end, label %if.then
Marking Edge Executable: a.true_b.false -> if.end
Marking Block Executable: if.then
Popped off BBWL:
if.then: ; preds = %a.true_b.false
call void @use()
br label %if.end
Marking Edge Executable: if.then -> if.end
Popped off BBWL:
entry:
br i1 %a, label %a.true_b.false, label %a.false
Popped off I-WL: %b.0 = call i1 @llvm.ssa.copy.i1(i1 %b)
```
We need to run IPSCCP twice to eliminate the dead branch with function `@use`.
It looks we have no code to mark edge b.true->a.true_b.false not executable on the last step.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNV21vozgQ_jXwZRRkIIHkAx82aSv1dKettCftx5XBA_HVAYRNsr1ff4Mh2YQ0TV9upUaJ49eZZ2Yez0BaiadkbUytnfCLE9zRlyu5xcBTarvxqqagmQyp-Zd-d6u_Z_iHw24c9mVoIzZ87VBgLkuEbSUFOFOmm8wJ5tIHJ5hxJ1hB302dYAFOvOzPYGmap067HQGkDRydUDxFZUeeaVr8kXo5VxpHS_2cFbAfhCTqtR8nXELdoNDUu-kk9pjGgNITrakFdDIlcw9L0Z8blt8C4xzHiWUXkQxqX_DW4JmTuVchO0P0y-qLbuLXwNGUWWPZH9wPPhSv58wFyLhSBy62HWnmxLwjvM8Gbuh_LHB7q3o_nXN37MlRoBs0FvhwyeKb4zsnMFO8wUuWja7knWy0ASM3CN9Wq4dvldpi4wSxBlUVh2s3OrThzeNX2tffZ-uMfWxfXk-PgT5UdY0CqjyHr_eT73--edug7S_SJssClqrKHuH2J2at4amyFH4u8i_vP9p4pn-57NX_rlRiw87skiVnZ-aU2VSrNfeyqn7ypH_ImekpXd-RhQaHYFOQhVlVasMJDy8Lsmo18btzzAlvQZamgnfhg849lyVfj8hgwdV952ZdDNwnvMKvgf17S4bH3lM0TuNyKwp8NnwwsSx6fYg-ZzG6au0p7HOrrxB4rOklBn-uqnjVMwPiNxPhf378u6BzX1c-kIJHJbJvvyOUSDooezZtCfcPXY0Fs5MZdnOo5EaW3NBgjSCQC7KPl9kadtKsIW_LzMiqhE5qH4yIeb3ke0MFunrUsENY8y3pqSjNCiu2K7-AXQz6G9D5fMTMsjKAhwAB6egQKE7PAtpg7Z17q29dTPwoYnHAosXUFUkoFuGCu0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