[Bug middle-end/44852] [4.6 Regression]: miscompilation of newlib dtoa.c after mem-ref2 merge

2010-07-07 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug middle-end/44852] [4.6 Regression]: miscompilation of newlib dtoa.c after mem-ref2 merge

2010-07-07 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-07-07 11:22 ---
The addition by 10 appears during postreload, where we substitute

(insn 24 35 65 4 t.i:9 (set (reg:QI 9 r9 [orig:44 prephitmp.3 ] [44])
(const_int 58 [0x3a])) 45 {movqi} (expr_list:REG_EQUAL (const_int 58
[0x3a])
(nil)))

for

(insn 24 35 65 4 t.i:9 (set (reg:QI 9 r9 [orig:44 prephitmp.3 ] [44])
(plus:QI (reg:QI 9 r9 [orig:44 prephitmp.3 ] [44])
(const_int 10 [0xa]))) 77 {*addqi3_non_v32} (expr_list:REG_EQUAL
(const_int 58 [0x3a])
(nil)))

in

(insn 69 34 35 4 t.i:8 (set (reg:QI 9 r9)
(const_int 48 [0x30])) 45 {movqi} (nil))

(insn 35 69 24 4 t.i:8 (set (mem:QI (plus:SI (reg/v/f:SI 10 r10 [orig:47 s ]
[47])
(const_int -1 [0x])) [0 MEM[(char *)s_22 +
4294967295B]+0 S1 A8])
(reg:QI 9 r9)) 45 {movqi} (nil))

(insn 24 35 65 4 t.i:9 (set (reg:QI 9 r9 [orig:44 prephitmp.3 ] [44])
(const_int 58 [0x3a])) 45 {movqi} (expr_list:REG_EQUAL (const_int 58
[0x3a])
(nil)))

which by itself doesn't look wrong.


-- 


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



[Bug middle-end/44852] [4.6 Regression]: miscompilation of newlib dtoa.c after mem-ref2 merge

2010-07-07 Thread hp at gcc dot gnu dot org


--- Comment #3 from hp at gcc dot gnu dot org  2010-07-07 16:24 ---
(In reply to comment #2)
 The addition by 10 appears during postreload, where we substitute
 ...
 which by itself doesn't look wrong.

That's right, if the two stores had been to different locations, it'd have been
optimal (the add by 10 being shorter than loading the constant 0x3a; no
scheduling issues).

But, JFTR, that observation is just incidental and beside the point.


-- 


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



[Bug middle-end/44852] [4.6 Regression]: miscompilation of newlib dtoa.c after mem-ref2 merge

2010-07-06 Thread hp at gcc dot gnu dot org


--- Comment #1 from hp at gcc dot gnu dot org  2010-07-07 03:44 ---
Created an attachment (id=21119)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21119action=view)
test-case suggested for gcc.c-torture/execute

Compile at e.g. -O2, observe code in PR description, also observed for r161899.


-- 


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



[Bug middle-end/44852] [4.6 Regression]: miscompilation of newlib dtoa.c after mem-ref2 merge

2010-07-06 Thread hp at gcc dot gnu dot org


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||wrong-code
   Last reconfirmed|-00-00 00:00:00 |2010-07-07 03:49:56
   date||


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