This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11557] [3.3 regression] constant folding


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-17 12:42:06
               date|                            |
   Target Milestone|3.4                         |3.3.1


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-17 12:42 -------
I can confirm this on 3.3.1 (20030707).
On the mainline (20030717), it is already fixed.
In fact the rtl is wrong at the begining (pr11557.c.00.rtl).
(insn 12 10 16 (nil) (set (reg/v:SI 61)
        (const_int 1 [0x1])) -1 (nil)
    (nil))

(insn 16 12 20 (nil) (set (reg:SI 63)     <----- the same reg as 
        (symbol_ref:SI ("one"))) -1 (nil)
    (nil))

(insn 20 16 14 (nil) (set (reg:SI 63)     <------ this one
        (symbol_ref:SI ("zero"))) -1 (nil)
    (nil))

<--- so 63 = zero

(insn 14 20 15 (nil) (set (reg:CCZ 17 flags)
        (compare:CCZ (reg/v:SI 61)
            (const_int 0 [0x0]))) -1 (nil)
    (nil))

(jump_insn 15 14 17 (nil) (set (pc)
        (if_then_else (eq (reg:CCZ 17 flags)
                (const_int 0 [0x0]))
            (label_ref 19)
            (pc))) -1 (nil)
    (nil))

(jump_insn 17 15 18 (nil) (set (pc)
        (label_ref 21)) -1 (nil)
    (nil))

(barrier 18 17 19)

(code_label 19 18 21 4 "" [0 uses])

(code_label 21 19 22 5 "" [0 uses])

(call_insn/u 22 21 23 (nil) (set (reg:SI 0 eax)
        (call (mem:QI (reg:SI 63) [0 S1 A8])                     <---- call reg 63 which is zero always
            (const_int 0 [0x0]))) -1 (nil)
    (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
        (nil))
    (nil))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]