diff options
author | Richard Biener <rguenther@suse.de> | 2022-12-08 09:07:36 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-12-08 11:58:47 +0100 |
commit | 892e8c520be37d0a0f14e2ae375103c5303ed549 (patch) | |
tree | 8a8030495b65c9fdd64db3049263cf47e6f32b9c /gcc/gimple-range.cc | |
parent | 4505270128ef70538ea345f292e3eb85a5369eaf (diff) | |
download | gcc-892e8c520be37d0a0f14e2ae375103c5303ed549.zip gcc-892e8c520be37d0a0f14e2ae375103c5303ed549.tar.gz gcc-892e8c520be37d0a0f14e2ae375103c5303ed549.tar.bz2 |
tree-optimization/107699 - missed &data._M_elems + _1 != &data._M_elems folding
The following addresses a missed folding noticed in PR107699 that can
be fixed amending the existing &x + a != &x + b pattern to also handle
the case of only one side having a pointer plus. I'm moving the
patterns next to related simpifications showing there'd be an existing
pattern matching this if it were not gated with an explicit single_use
constraint. Note the new pattern also handles &x.a + a != &x.b, but
this hints at some unification / generalization opportunities here.
PR tree-optimization/107699
* match.pd (&a !=/== &a.b + c -> (&a - &a.b) !=/== c): New
pattern variant.
* gcc.dg/tree-ssa/pr107699.c: New testcase.
Diffstat (limited to 'gcc/gimple-range.cc')
0 files changed, 0 insertions, 0 deletions