https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108292
--- Comment #8 from Roger Sayle <roger at nextmovesoftware dot com> --- Created attachment 54195 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54195&action=edit Roger's proposed patch Here's my proposed patch (or something close to it, it's still bootstrapping and regression testing). The goal is to capture the original comparison (at the top of the BB), and avoid/ignore the actual comparison that we may have converted to. Sorry again to the inconvenience. Please let me know what you think.