aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-5.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-09-03 12:54:58 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2025-09-04 10:03:32 +0200
commit95afbe4c7633459b59d434550888decc41b4d44f (patch)
tree597bdae49cffdc7fecd8ceb4cd456a9885b78c90 /gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-5.c
parentb26033d579a9df55f38f3b9ff8400c21f2a5717d (diff)
downloadgcc-95afbe4c7633459b59d434550888decc41b4d44f.zip
gcc-95afbe4c7633459b59d434550888decc41b4d44f.tar.gz
gcc-95afbe4c7633459b59d434550888decc41b4d44f.tar.bz2
tree-optimization/121740 - handle aggregate zeroing as skipped may-def
The following makes value-numbering handle a situation like D.58046 = {}; SR.83_44->i = {}; pretmp_41 = MEM[(struct _Optional_payload_base &)&D.58046 + 8]._M_engaged; where the intermediate may-def SR.83_44->i = {} prevents CSE of the load to zero. The problem is two-fold here, one is that the code skipping may-defs does not handle zeroing via a CTOR, the other is that (partial) must-defs can be better handled by later code as otherwise we may not find an appropriate definition to CSE to. I've noticed we fail to guard against storage-order issues, so fixed that on the fly. PR tree-optimization/121740 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Allow skipping may-defs from CTORs. Do not skip may-defs with storage-order issues or (partial) must-defs. * gcc.dg/tree-ssa/ssa-fre-104.c: Un-XFAIL. * gcc.dg/tree-ssa/ssa-fre-110.c: New testcase.
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-5.c')
0 files changed, 0 insertions, 0 deletions