This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25130] [4.1/4.2 Regression] miscompilation in GCSE
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Dec 2005 00:58:49 -0000
- Subject: [Bug rtl-optimization/25130] [4.1/4.2 Regression] miscompilation in GCSE
- References: <bug-25130-702@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from steven at gcc dot gnu dot org 2005-12-27 00:58 -------
Created an attachment (id=10557)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10557&action=view)
Make hash_rtx and exp_equiv_p take MEM_ATTRS into accoutn
The test cases don't fail with GCC 4.2 anymore, but with GCC 4.1 they both
still fail. I think the right thing to do is to make the expressions not look
the same to the dataflow equations -- after all they _are_ not the same.
But with this patch I'm unsure what will happen with e.g. loads from different
fields of a union for which the MEM address looks the same. The MEM_ATTRS will
be different, so with my patch we won't see them as equivalent loads, I think.
But I haven't actually tested that. I haven't even tested the patch yet
really, but it does make the wrong-code problem go away for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25130