This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/23488] [4.1 Regression] extra reads from static variable
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2005 23:31:11 -0000
- Subject: [Bug target/23488] [4.1 Regression] extra reads from static variable
- References: <20050819213951.23488.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-19 23:31 -------
(In reply to comment #3)
> I am surprised that gcse.c load PRE can't already handle this situation. Is
> something broken, or is it really just not able to handle this? What does the
> RTL look like when we are in GCSE?
(insn 11 9 12 0 (set (reg:CCZ 17 flags)
(compare:CCZ (mem/i:SI (symbol_ref:SI ("result.1279") [flags 0x2] <var_decl 0xb7cb0108 result>)
[2 result+0 S4 A32])
(const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil)
(nil))
Which is unlike what we got in 4.0.0:
(insn 11 9 12 0 (set (reg:SI 59 [ result ])
(mem/i:SI (symbol_ref:SI ("result.1132") [flags 0x2] <var_decl 0xb7ce7a8c result>) [2 result+0 S4
A32])) 35 {*movsi_1} (nil)
(nil))
(insn 12 11 13 0 (set (reg:CCZ 17 flags)
(compare:CCZ (reg:SI 59 [ result ])
(const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil)
(nil))
so either GCSE needs to be improved to recongized that or Honza's patch should be reverted. We are in
stage3, I would say the latter one untill this gets improved on the tree level.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23488