https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91191
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2019-07-18 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue is that VRP doesn't handle the way we optimize the union punning: <bb 2> : _6 = VIEW_CONVERT_EXPR<unsigned char>(b_4(D)); if (_6 > 1) if we decide to rely on appropriate sign/zero-extending of sub-size precision entities (otherwise we'd have simplified the VIEW_CONVERT to a simple conversion) the attached fixes the missed optimzation.