On Fri, Sep 01, 2023 at 10:13:40AM +0200, Richard Biener via Gcc wrote: > The value of .CLZ (0) is undefined then. I belive your analysis is correct in > that both 63 - _35 might overflow and that dom3 (thus ranger) mis-computes > the range for _35. I wonder why we don't elide _36 ? _31 : 1 with that info > (possibly no range-op for .CLZ?), of course it would be wrong to do so. > > Can you open a bugreport please?
Seems similar to https://gcc.gnu.org/pipermail/gcc-patches/2023-February/thread.html#612214 except that case is at RTL level. But arguably, I think at least at GIMPLE level we should just emit here GIMPLE_COND + separate bb around it rather than COND_EXPR. Jakub