This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16482] [4.0 Regression] gcc.c-torture/unsorted/SFset.c fails with "-O2 -m4"
- From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2004 13:35:43 -0000
- Subject: [Bug target/16482] [4.0 Regression] gcc.c-torture/unsorted/SFset.c fails with "-O2 -m4"
- References: <20040711232647.16482.kkojima@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amylaar at gcc dot gnu dot org 2004-10-15 13:35 -------
Your examples return an undefined value, which raises some extra issues, but
that is really a red herring; I see the same failure with:
int glob1;
int
adrreg01limm1_set (float *p0)
{
int r = 5;
p0[10] = (float) glob1;
return r;
}
compiled with -m4 -O2 -fPIC .
In particular, sched1 moves instruction past the return value copy and use.
after regmove:
(insn:HI 27 24 33 0 (set (reg/i:SI 0 r0 [ <result> ])
(const_int 5 [0x5])) 129 {movsi_ie} (nil)
(nil))
(insn:HI 33 27 0 0 (use (reg/i:SI 0 r0 [ <result> ])) -1 (insn_list:REG_DEP_TRUE
27 (nil))
(nil))
;; End of basic block 0, registers live:
0 [r0] 12 [r12] 14 [r14] 15 [r15] 145 [ap] 151 []
after sched1:
(insn:HI 27 14 47 1 (set (reg/i:SI 0 r0 [ <result> ])
(const_int 5 [0x5])) 129 {movsi_ie} (nil)
(nil))
(insn 47 27 40 1 (set (reg:SI 175)
(plus:SI (reg:SI 174)
(reg:SI 12 r12))) 23 {*addsi3_compact} (insn_list:REG_DEP_TRUE 46 (nil))
(expr_list:REG_DEAD (reg:SI 174)
(nil)))
(insn 40 47 48 1 (set (reg:SI 170)
(const:SI (unspec [
(symbol_ref:SI ("__fpscr_values"))
] 7))) 129 {movsi_ie} (nil)
(nil))
(insn 48 40 33 1 (set (reg:SI 173)
(mem/u:SI (reg:SI 175) [0 S4 A32])) 129 {movsi_ie}
(insn_list:REG_DEP_TRUE 47 (nil))
(expr_list:REG_DEAD (reg:SI 175)
(expr_list:REG_EQUAL (symbol_ref:SI ("__fpscr_values"))
(nil))))
(insn:HI 33 48 16 1 (use (reg/i:SI 0 r0 [ <result> ])) -1
(insn_list:REG_DEP_TRUE 27 (nil))
(nil))
(insn:HI 16 33 41 1 (set (reg/f:SI 162)
(mem/u:SI (plus:SI (reg:SI 12 r12)
(reg/f:SI 163)) [0 S4 A32])) 129 {movsi_ie}
(insn_list:REG_DEP_TRUE 14 (nil))
(expr_list:REG_DEAD (reg/f:SI 163)
(expr_list:REG_EQUAL (symbol_ref:SI ("glob1") <var_decl 0x401e415c glob1>)
(nil))))
The return value use schould remain at the end of the basic block, and the
preceding return value copy should be in the same scheduling group.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |amylaar at gcc dot gnu dot
| |org
Last reconfirmed|2004-10-13 02:19:55 |2004-10-15 13:35:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16482