<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68683>68683</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[LVI][CVP] CVP error deleted `phi`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
DianQK
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DianQK
</td>
</tr>
</table>
<pre>
I tried this IR:
```llvm
declare void @llvm.assume(i1)
declare i32 @llvm.abs.i32(i32, i1)
declare i1 @llvm.abs.i1(i1, i1)
define i32 @src(i1 %c0, i1 %c1, i32 %v1) {
start:
br i1 %c0, label %bb0, label %bb1
bb0:
%lim = icmp sle i32 %v1, -1
call void @llvm.assume(i1 %lim)
br label %bb1
bb1:
%x = phi i32 [ %v1, %bb0 ], [ undef, %start ]
br i1 %c1, label %bb0, label %bb2
bb2:
%z = call i32 @llvm.abs.i32(i32 %x, i1 false)
ret i32 %z
}
```
`phi` should not be deleted by CVP.
alive2: https://alive2.llvm.org/ce/z/5QKn_Z
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVD1v2zAQ_TXUcoghnkwmHjTUFgQE6ZB0yNClIKWzxYKWDJJym_z6QpQsW2mDwgZt8t69e_f4obw3h5YoZ2LLEAuj2pcnhshEkag-NJ3Lx7VEd_Vb_gjBGaohNMbD4zeWfWFpwdLLKNPxa-35OC7VVFnlCM6dqYGtY2SlvO-PxPDBcIabJdBkeMVpvzIZDsBh3MG_8HwJ5xPtAnxJ2Zt2ruBdFaHAUFTpmBD_j8kDCMV54AB2vx0ZfFAuzE0DaAe3BFZpssNU649zfitkCF9JGAprjsCyAkx1PIG3dFt-B3f8Aq2UtZ9aORHNTUd5n0vgSwm_o4BTY8baYnutPzYETBRxJrbQtzXtp1D0JAb_MoX_xxRcKsKloveoKLb86aGIyqe92yvr6aZ7R-Hi4_tU6L74cFA_nN5TY5hMwTddb2touwCaoCZLgWrQb7B7fV7dpihrzjTIhiaEkx_0Y8mwHNdXUW_nDgzLihiW7wxL8fLU_vie1HlWb7KNSijnciM3WZYiT5ocUa83XHO1pmzNhZBKppo0KhIZSSkSk2OKGU_jRwq-2ld1jfeak5QqlVyxdUpHZexcPTHe95TLB_mQJdF9P932ln5BDE4X3uVDzp3uD35w2_jgryzBBBufia-vj8Nui-3u9ZmJYjAFyLnOzU7NTia9s_nSmoMJTa9XVXdkWMZ3Yvy5O7nuJ1WBYRkleYZllPwnAAD__0I8Rlk">