https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112706
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d9abaa8d58f5729925b1db735d4723a9ea825eaa commit r14-5872-gd9abaa8d58f5729925b1db735d4723a9ea825eaa Author: Richard Biener <rguent...@suse.de> Date: Mon Nov 27 09:45:04 2023 +0100 tree-optimization/112706 - missed simplification of condition We lack a match.pd pattern recognizing ptr + o ==/!= ptr + o'. The following extends handling we have for integral types to pointers. PR tree-optimization/112706 * match.pd (ptr + o ==/!=/- ptr + o'): New patterns. * gcc.dg/tree-ssa/pr112706.c: New testcase.