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/57159] Latent bug in RTL GCSE/PRE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57159

--- Comment #4 from jules at gcc dot gnu.org 2013-05-03 19:56:33 UTC ---
Created attachment 30029
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30029
Before/after dumps

Here are some before/after dumps taken from the out-of-tree port. Notice how in
the "before" pre dump, the results of insns 27 and 28 are considered to be
equivalent to the results of insns 16 and 17, despite the store (insn 18)
making that equivalence invalid -- this is the misoptimisation alluded to
earlier.

This happens because oprs_available_p mistakenly thinks that insn 16/17's
results are available at the end of their BB, because oprs_unchanged_p ->
load_killed_in_block_p -> mems_conflict_for_gcse_p -> find_rtx_in_ldst finds a
load/store that it thinks it can deal with ("(mem/s:SI (reg/v/f:SI 68 [ iter
]))"), but actually that mem is used (in the REG_EQUAL note, as extracted by
hash_scan_set) in a way that it cannot handle.


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