This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-2.95 19990623 64-bit PowerPC CSE bug
- To: Jeffrey Law <law at cygnus dot com>
- Subject: gcc-2.95 19990623 64-bit PowerPC CSE bug
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Thu, 24 Jun 1999 01:11:58 -0400
- Cc: egcs-bugs at egcs dot cygnus dot com
In 64-bit mode, gcc-2.95 miscompiles the function "f" in
gcc.c-torture/execute/divconst-2.c . Looking at the intermediate RTL
dumps, a crucial negation is removed:
-----divconst-2.c.jump-----
(insn 16 14 17 (set (reg:DI 83)
(ashiftrt:DI (reg:DI 86)
(const_int 31 [0x1f]))) -1 (nil)
(expr_list:REG_EQUAL (div:DI (reg/v:DI 82)
(const_int -2147483648 [0x80000000]))
(nil)))
(insn 17 16 19 (set (reg:DI 83)
(neg:DI (reg:DI 83))) -1 (nil)
(expr_list:REG_EQUAL (div:DI (reg/v:DI 82)
(const_int -2147483648 [0x80000000]))
(nil)))
(insn 19 17 20 (set (reg/i:DI 3 r3)
(reg:DI 83)) -1 (nil)
(nil))
-----divconst-2.c.cse-----
(insn 16 14 19 (set (reg:DI 83)
(ashiftrt:DI (reg:DI 86)
(const_int 31 [0x1f]))) 386 {ashrdi3+1} (nil)
(expr_list:REG_EQUAL (div:DI (reg/v:DI 82)
(const_int -2147483648 [0x80000000]))
(nil)))
(insn 19 16 20 (set (reg/i:DI 3 r3)
(reg:DI 83)) 448 {*movdi_64} (nil)
(nil))
Any idea what would make the backend think this transformation was
correct?
Thanks, David