This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/64557] get_addr in true_dependence_1 cannot handle VALUE inside an expr


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64557

--- Comment #1 from wmi at google dot com ---
The experimental patch is to call get_addr for VALUE of base before plus other
constant, when creating mem_addr for dependence check and for store_info.
bootstrap and regression on x86_64-linux-gnu are ok. 

Index: dse.c
===================================================================
--- dse.c    (revision 219421)
+++ dse.c    (working copy)
@@ -1564,6 +1564,7 @@ record_store (rtx body, bb_info_t bb_inf
         = rtx_group_vec[group_id];
       mem_addr = group->canon_base_addr;
     }
+      mem_addr = get_addr (mem_addr);
       if (offset)
     mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
     }
@@ -2177,6 +2178,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t
         = rtx_group_vec[group_id];
       mem_addr = group->canon_base_addr;
     }
+      mem_addr = get_addr (mem_addr);
       if (offset)
     mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
     }


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