Hi, This patch fixes an obvious typo which may affect the DDG creation of SMS and make this optimization produce buggy code. Bootstrapped on x86_64-suse-linux. Also passed check-gcc test for aarch64-linux-gnu. OK for the trunk?
Index: gcc/ddg.c =================================================================== --- gcc/ddg.c (revision 218582) +++ gcc/ddg.c (working copy) @@ -77,7 +77,7 @@ mark_mem_use (rtx *x, void *) { subrtx_iterator::array_type array; FOR_EACH_SUBRTX (iter, array, *x, NONCONST) - if (MEM_P (*x)) + if (MEM_P (*iter)) { mem_ref_p = true; break; Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 218582) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2014-12-16 Felix Yang <felix.y...@huawei.com> + + PR rtl-optimization/64240 + * ddg.c (mark_mem_use): Check *iter instead of *x. + 2014-12-10 Felix Yang <felix.y...@huawei.com> * config/aarch64/aarch64-protos.h (aarch64_function_profiler): Remove
pr64240.diff
Description: pr64240.diff