This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 54494, removal of volatile store in strlen optimization because of the inlininer


Hi,
  The inlininer likes to recreate some MEM_REF, it copies most of the
bits (TREE_THIS_NOTRAP, TREE_THIS_VOLATILE, etc.) but forgets about
TREE_SIDE_EFFECTS.  This causes the strlen optimization to think the
memory store does not have a side effects.

OK?  Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also.

testsuite/ChangeLog:
* gcc.dg/tree-ssa/strlen-1.c: New testcase.

Attachment: fixpr49474.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]