diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-04-07 17:06:17 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2025-04-18 09:13:48 -0700 |
commit | 800b3977031dd4f14d09ced975276e09457dfff7 (patch) | |
tree | 7b1d28eb84360625692bf05624ecee9c597e7ff6 /libjava/classpath | |
parent | 16082bdc6beef1ca1485ed5ccdc0c52aabbe0f4c (diff) | |
download | gcc-800b3977031dd4f14d09ced975276e09457dfff7.zip gcc-800b3977031dd4f14d09ced975276e09457dfff7.tar.gz gcc-800b3977031dd4f14d09ced975276e09457dfff7.tar.bz2 |
DSE: Support triming of some more memset [PR87901]
DSE has support for trimming memset (and memset like) statements.
In this case we have `MEM <unsigned char[17]> [(char * {ref-all})&z] = {};` in
the IR and when we go to trim it, we call build_fold_addr_expr which leaves around
a cast from one pointer type to another. This is due to build_fold_addr_expr
being generic but in gimple you don't need these casts.
PR tree-optimization/87901
gcc/ChangeLog:
* tree-ssa-dse.cc (maybe_trim_constructor_store): Strip over useless type
conversions after taking the address of the MEM_REF.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/ssa-dse-52.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libjava/classpath')
0 files changed, 0 insertions, 0 deletions