https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88712
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Known to work| |11.1.0 Target Milestone|--- |11.0 Known to fail| |10.3.0 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > so the clearing of %edx is sandwiched in between the cmp and cmov. Later on > in this case sched2 reorders those and so we at that point could replace it, > but we don't have another peephole2 pass and passes after sched2 don't have > the needed infrastructure to check if the flags are dead (because movl $0, > reg doesn't clobber flags, but xorl reg, reg does). Right and the peephole2 that implemented that was done in r11-2588 so closing as fixed in GCC 11+.