https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112659
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is the pattern I added for the plus case: ``` (for cnd (cond vec_cond) ... /* (a != CST1) ? (a + CST2) : 0 -> (a + CST2) iff CST1 == -CST2 */ (simplify (cnd (ne @0 uniform_integer_cst_p@1) (plus@3 @0 uniform_integer_cst_p@2) integer_zerop) (if (wi::to_wide (uniform_integer_cst_p (@1)) == -wi::to_wide (uniform_integer_cst_p (@2))) @3)) ) ``` The division one is harder, I think I might only handle unsigned. Or maybe decide that division is not a good idea to do ...