https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85563

--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
IIUC, EVRP sees if(x!=3)__builtin_unreachable() and adds a range [3,3] on x.
The condition thus gets cleaned up and __builtin_unreachable disappears. This
could be fine, except that x has a single use, the test x!=3, so we are just
killing it. I assume that in older versions this was happening later, so
various optimizations had time to CSE x with something else, maybe. Would it
make sense to check !has_single_use before doing this optimization, at least
for the early pass EVRP?
(this probably isn't just diagnostic but also missed optimization)

Reply via email to