------- Comment #3 from jakub at gcc dot gnu dot org 2008-11-21 08:09 -------
Just the cause that the optimized dump looks differently, but is not wrong.
The bug happens during reload's register elimination.
(insn:HI 6 5 7 2 20080806-1.c:16 (parallel [
(set (reg:HI 58 [ pretmp.42 ])
(plus:HI (subreg:HI (reg/f:SI 20 frame) 0)
(const_int 136 [0x88])))
(clobber (reg:CC 17 flags))
]) 293 {*addhi_1_lea} (expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
is reloaded into:
(insn 47 5 6 2 20080806-1.c:16 (set (reg:HI 1 dx [orig:58 pretmp.42 ] [58])
(reg:HI 7 sp)) 53 {*movhi_1} (nil))
(insn:HI 6 47 7 2 20080806-1.c:16 (parallel [
(set (reg:HI 1 dx [orig:58 pretmp.42 ] [58])
(plus:HI (reg:HI 1 dx [orig:58 pretmp.42 ] [58])
(const_int 65544 [0x10008])))
(clobber (reg:CC 17 flags))
]) 293 {*addhi_1_lea} (expr_list:REG_EQUIV (plus:HI (subreg:HI (plus:SI
(reg/f:SI 7 sp)
(const_int 65408 [0xff80])) 0)
(const_int 136 [0x88]))
(nil)))
eliminate_regs_in_insn calls plus_constant with
to_rtx (subreg:HI (reg/f:SI 7 sp) 0) and offset 0x10008. I guess it is
eliminate_regs_in_insn and not plus_constant responsibility to
trunc_int_for_mode this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38208