diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-02-20 22:05:38 -0800 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2025-06-04 09:04:04 -0700 |
commit | 069caa5cea91fab3f1579ee1fdf50b923b75a6de (patch) | |
tree | 61984cad54857720357f20c3b3930dceb04e7391 /gcc/testsuite/gcc.dg/gomp/udr-3.c | |
parent | 7bb1933c1fcca8cb99132ff5d08b3f3efca4ff07 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
This implements a simple copy propagation for aggregates in the similar
fashion as we already do for copy prop of zeroing.
Right now this only looks at the previous vdef statement but this allows us
to catch a lot of cases that show up in C++ code.
This used to deleted aggregate copies that are to the same location (PR57361)
But that was found to delete statements that are needed for aliasing markers reason.
So we need to keep them around until that is solved. Note DSE will delete the statements
anyways so there is no testcase added since we expose the latent bug in the same way.
See https://gcc.gnu.org/pipermail/gcc-patches/2025-May/685003.html for the testcase and
explaintation there.
Also adds a variant of pr22237.c which was found while working on this patch.
Changes since v1:
* v2: change check for vuse to use default definition.
Remove dest/src arguments for optimize_agr_copyprop
Changed dump messages slightly.
Added stats
Don't delete `a = a` until aliasing markers are added.
PR tree-optimization/14295
PR tree-optimization/108358
PR tree-optimization/114169
gcc/ChangeLog:
* tree-ssa-forwprop.cc (optimize_agr_copyprop): New function.
(pass_forwprop::execute): Call optimize_agr_copyprop for load/store statements.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/20031106-6.c: Un-xfail. Add scan for forwprop1.
* g++.dg/opt/pr66119.C: Disable forwprop since that does
the copy prop now.
* gcc.dg/tree-ssa/pr108358-a.c: New test.
* gcc.dg/tree-ssa/pr114169-1.c: New test.
* gcc.c-torture/execute/builtins/pr22237-1-lib.c: New test.
* gcc.c-torture/execute/builtins/pr22237-1.c: New test.
* gcc.dg/tree-ssa/pr57361.c: Disable forwprop1.
* gcc.dg/tree-ssa/pr57361-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/udr-3.c')
0 files changed, 0 insertions, 0 deletions