<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89959>89959</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Assertion in Scalar Evolution when running IRCE
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
gbaraldi
</td>
</tr>
</table>
<pre>
The following IR crashes with
```llvm
define void @foo() {
top:
br label %L3
L3: ; preds = %L13, %top
%value_phi = phi ptr [ null, %top ], [ %0, %L13 ]
%0 = getelementptr i8, ptr %value_phi, i64 8
%.not = icmp ule ptr %value_phi, null
br i1 %.not, label %L13, label %L15
L13: ; preds = %L3
br label %L3
L15: ; preds = %L3
ret void
}
```
`opt --passes=irce`
https://godbolt.org/z/1sbvaT7r1
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU02PmzAQ_TXDZZTIHzjAgUOyWaRKe2r3Xhkw4MrByDaJ2l9f2aRKumrVSgjbM-89j5890ns9zkrVIE4gzplcw2RdPbbSSdPrrLX99_p9UjhYY-xNzyN--oydk35SHm86TAjkDOQIB7J9xlwvW6hXg54VXq3uEXIyWAusBFYhFKcNEewC_LjNEVuHRrbKIDDxxu-y6f_GgR8R-AkXp3qPwM8JRDmwlziLQncVYOIqzaq-LpNOwDguwSGIE86rMQ8KgjinlTjFCLln3ihPmYcgSUKjCsqoi5pDlNNlhCfhpx1jTB9yLJ_Y-9mGJKC7y4KrUX9kpdIeTmj6ixqTD1-2Iz-txW9G0b84xf_DZCr-wXUqpNu8s4rzh6t_VoMDsUvA3W6R3isP_Kxdp-BA8Bk1hbD4-ARYA6wZbd9aE_bWjcCaH8Aa6turfC8cxayveV_xSmaqpgXlVUkOQmRTXZGBStoWhLdFLoRkB9pXnFFOhkF21ZDpmhGWk5zltMhzmu-LNs8LUYiSUM4O5QA5URepzT4-3bh5pr1fVV1Wlaiy5JZP_cHYrG6YksBYbBdXR86uXUcPOTHaB_9QCToYVR-9Vy5oO6Oe8UsnjXT4erVmTbHbpGZ06zxvnfXymq3O1B9s0WFa231nL8Ca1F7bsFuc_aa6AKxJNXlgTar5ZwAAAP__B4cWQQ">