------- Additional Comments From sje at cup dot hp dot com 2005-01-10 23:43 ------- I looked into this bug some, it is fixed on 4.0, but the patch that fixes it is the integration of tree-ssa into the mainline. I believe that the underlying combine bug still exists but the tree-ssa changes result in different RTL being generated so that the combine bug isn't hit. I looked at try_combine using the 3.4 sources. Attached is the i1, i2, i3 values we enter try_combine with and what it generates. I have no idea how it came up with the result that it did but that seems to be the heart of the problem.
In try_combine: I1 is (nil) I2 is (insn 53 51 54 2 (set (reg:BI 360) (eq:BI (reg/v:SI 341 [ rnd_mode ]) (const_int 2 [0x2]))) 209 {*cmpsi_normal} (nil) (expr_list:REG_DEAD (reg/v:SI 341 [ rnd_mode ]) (nil))) I3 is (insn 57 56 58 2 (set (reg:BI 363) (and:BI (gt:BI (reg/v:SI 342 [ signx ]) (const_int 0 [0x0])) (reg:BI 360))) 66 {*cmpsi_and_1} (insn_list 53 (nil)) (expr_list:REG_DEAD (reg/v:SI 342 [ signx ]) (expr_list:REG_DEAD (reg:BI 360) (nil)))) ========================== Returns: (insn 57 56 58 2 (set (reg:BI 363) (const_int 0 [0x0])) 1 {movbi} (nil) (nil)) ========================== -- What |Removed |Added ---------------------------------------------------------------------------- CC| |sje at cup dot hp dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17169