https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101807
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Last reconfirmed| |2023-05-18 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have a patch. It even handles: unsigned f(unsigned a, unsigned b) { if (a > 1) __builtin_unreachable(); if (b > 1) __builtin_unreachable(); return a<b; } Which gives: xorl $1, %edi movl %edi, %eax andl %esi, %eax