------- Comment #3 from rguenth at gcc dot gnu dot org 2006-11-10 13:28 ------- combine combines
(insn 10 8 11 2 (parallel [ (set (reg:SI 121) (and:SI (reg/v:SI 119 [ nStyle ]) (const_int 32768 [0x8000]))) (clobber (scratch:CC)) ]) 131 {andsi3} (insn_list:REG_DEP_TRUE 8 (nil)) (expr_list:REG_UNUSED (scratch:CC) (nil))) (insn 11 10 12 2 (set (reg:CC 122) (compare:CC (reg:SI 121) (const_int 0 [0x0]))) 456 {*cmpsi_internal1} (insn_list:REG_DEP_TRUE 10 (nil)) (expr_list:REG_DEAD (reg:SI 121) (nil))) to (note 10 8 11 2 NOTE_INSN_DELETED) (insn 11 10 12 2 (parallel [ (set (reg:CC 122) (compare:CC (zero_extract:SI (reg/v:SI 119 [ nStyle ]) (const_int 1 [0x1]) (const_int 16 [0x10])) (const_int 0 [0x0]))) (clobber (scratch:SI)) ]) 157 {*extzvsi_internal1} (insn_list:REG_DEP_TRUE 8 (nil)) (expr_list:REG_UNUSED (scratch:SI) (nil))) then ifcvt comes along and produces IF-THEN block found, pass 1, start block 2 [insn 5], then 3 [14], join 4 [17] Conversion succeeded on pass 1. IF-THEN block found, pass 1, start block 2 [insn 5], then 5 [24], join 6 [28] IF-CASE-2 found, start 2, else 6 deleted 1 dead insns 3 possible IF blocks searched. 1 IF blocks converted. 2 true changes made. (insn 8 7 10 2 (set (reg/v:SI 119 [ nStyle ]) (reg:SI 3 3)) 321 {*movsi_internal1} (insn_list:REG_DEP_TRUE 7 (nil)) (expr_list:REG_DEAD (reg:SI 3 3) (nil))) (note 10 8 20 2 NOTE_INSN_DELETED) (insn 20 10 21 2 (set (reg:SI 123) (const_int 98304 [0x18000])) 321 {*movsi_internal1} (nil) (nil)) split then splits the constant load of reg:SI 123 (!?) so we end up with main: stwu %r1,-16(%r1) mflr %r0 stw %r0,20(%r1) bl bar lis %r0,0x1 ori %r0,%r0,32768 cmpw %cr7,%r3,%r0 beq+ %cr7,.L6 bl abort .L6: li %r3,0 lwz %r0,20(%r1) mtlr %r0 addi %r1,%r1,16 blr and indeed, disabling if-conversion fixes the problem. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29797