This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DECL_RTL problem
More details. After loop, we have:
(insn 2747 2745 2749 (set (reg/f:SI 648)
(reg/f:SI 521)) 175 {*arm_movsi_insn} (nil)
(nil))
(insn 2749 2747 2754 (set (reg/f:SI 647)
(mem/s:SI (plus:SI (reg/f:SI 648)
(const_int 80 [0x50])) 0)) 175 {*arm_movsi_insn} (nil)
(nil))
(insn 2754 2749 2755 (set (reg:CC 24 cc)
(compare:CC (reg/f:SI 647)
(const_int 0 [0x0]))) 217 {*arm_cmpsi_insn} (nil)
(nil))
(jump_insn 2755 2754 3963 (set (pc)
(if_then_else (ne (reg:CC 24 cc)
(const_int 0 [0x0]))
(label_ref 2778)
(pc))) 234 {*arm_cond_branch} (nil)
(nil))
After CSE2, we have:
(insn 2747 2745 2749 (set (reg/f:SI 648)
(reg/f:SI 810)) 175 {*arm_movsi_insn} (nil)
(nil))
(insn 2749 2747 2754 (set (reg/f:SI 647)
(reg:SI 522)) 175 {*arm_movsi_insn} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
(insn 2754 2749 2755 (set (reg:CC 24 cc)
(compare:CC (reg:SI 522)
(const_int 0 [0x0]))) 217 {*arm_cmpsi_insn} (nil)
(nil))
(note 2755 2754 3963 NOTE_INSN_DELETED 0)
The conditional branch is gone. Tsk, tsk.
It's provable at this point that reg:SI 522 is non-zero so CSE should
know that the jump will always be taken, not never be taken.
Hmm.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com