aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-05-14 11:13:51 +0200
committerRichard Biener <rguenther@suse.de>2024-05-14 19:00:27 +0200
commitc290e6a0b7a9de5692963affc6627a4af7dc2411 (patch)
treef7b8f3cda47d4876fa4d6318f1ed559e40fe3b99 /gcc/cp/parser.cc
parent54ba8d44bbd703bca6984700b4d6f978890097e2 (diff)
downloadgcc-c290e6a0b7a9de5692963affc6627a4af7dc2411.zip
gcc-c290e6a0b7a9de5692963affc6627a4af7dc2411.tar.gz
gcc-c290e6a0b7a9de5692963affc6627a4af7dc2411.tar.bz2
tree-optimization/99954 - redo loop distribution memcpy recognition fix
The following revisits the fix for PR99954 which was observed as causing missed memcpy recognition and instead using memmove for non-aliasing copies. While the original fix mitigated bogus recognition of memcpy the root cause was not properly identified. The root cause is dr_analyze_indices "failing" to handle union references and leaving the DRs indices in a state that's not correctly handled by dr_may_alias. The following mitigates this there appropriately, restoring memcpy recognition for non-aliasing copies. This makes us run into a latent issue in ptr_deref_may_alias_decl_p when the pointer is something like &MEM[0].a in which case we fail to handle non-SSA name pointers. Add code similar to what we have in ptr_derefs_may_alias_p. PR tree-optimization/99954 * tree-data-ref.cc (dr_may_alias_p): For bases that are not completely analyzed fall back to TBAA and points-to. * tree-loop-distribution.cc (loop_distribution::classify_builtin_ldst): When there is no dependence again classify as memcpy. * tree-ssa-alias.cc (ptr_deref_may_alias_decl_p): Verify the pointer is an SSA name. * gcc.dg/tree-ssa/ldist-40.c: New testcase.
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions