This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/57159] Latent bug in RTL GCSE/PRE
- From: "jules at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 May 2013 19:56:33 +0000
- Subject: [Bug rtl-optimization/57159] Latent bug in RTL GCSE/PRE
- Auto-submitted: auto-generated
- References: <bug-57159-4 at http dot gcc dot gnu dot org/bugzilla/>
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.