https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51030
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 56317 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56317&action=edit First set of patches Note the last patch is still being worked on really. Note the first patch is just a small speed up and makes the last patch easier to write. The middle 2 patches are ones which move some of the optimizations that value_replacement does to match. I think I need the `a == 1` cases still.