https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79665
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- You can put a breakpoint at the new expr.c code and see what both the unsigned and signed sequences are and see what seq_cost gcc computed. If the costs don't match the hw, then it can of course choose a worse sequence.