diff options
author | Alex Coplan <alex.coplan@arm.com> | 2024-05-03 09:23:59 +0100 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2024-05-03 09:23:59 +0100 |
commit | fe40d525619eee9c2821126390df75068df4773a (patch) | |
tree | 682a98e9bd2067df7e70d4229ed766e6d3d15cb4 /gcc/bitmap.cc | |
parent | 7117e1f6bf6de25c1ff26c4d7abcc79b407ca221 (diff) | |
download | gcc-fe40d525619eee9c2821126390df75068df4773a.zip gcc-fe40d525619eee9c2821126390df75068df4773a.tar.gz gcc-fe40d525619eee9c2821126390df75068df4773a.tar.bz2 |
cfgrtl: Fix MEM_EXPR update in duplicate_insn_chain [PR114924]
The PR shows that when cfgrtl.cc:duplicate_insn_chain attempts to
update the MR_DEPENDENCE_CLIQUE information for a MEM_EXPR we can end up
accidentally dropping (e.g.) an ARRAY_REF from the MEM_EXPR and end up
replacing it with the underlying MEM_REF. This leads to an
inconsistency in the MEM_EXPR information, and could lead to wrong code.
While the walk down to the MEM_REF is necessary to update
MR_DEPENDENCE_CLIQUE, we should use the outer tree expression for the
MEM_EXPR. This patch does that.
gcc/ChangeLog:
PR rtl-optimization/114924
* cfgrtl.cc (duplicate_insn_chain): When updating MEM_EXPRs,
don't strip (e.g.) ARRAY_REFs from the final MEM_EXPR.
Diffstat (limited to 'gcc/bitmap.cc')
0 files changed, 0 insertions, 0 deletions