http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52838
Uros Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-04-04 CC| |ebotcazou at gcc dot | |gnu.org Component|target |rtl-optimization Ever Confirmed|0 |1 --- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-04 19:06:57 UTC --- This looks like a combine problem: (insn 8 6 9 2 (set (reg/f:SI 59 [ D.1705 ]) (subreg/s/u:SI (reg:DI 60) 0)) pr52838.c:6 64 {*movsi_internal} (expr_list:REG_DEAD (reg:DI 60) (nil))) (insn 9 8 10 2 (set (reg/f:DI 62 [ D.1705 ]) (zero_extend:DI (reg/f:SI 59 [ D.1705 ]))) pr52838.c:6 112 {*zero_extendsidi2_rex64} (expr_list:REG_DEAD (reg/f:SI 59 [ D.1705 ]) (nil))) This gets transformed by combine pass: Trying 8 -> 9: Successfully matched this instruction: (set (reg/f:DI 62 [ D.1705 ]) (reg:DI 60)) deferring deletion of insn with uid = 8. modifying insn i3 9 r62:DI=r60:DI REG_DEAD: r60:DI into: (note 8 6 9 2 NOTE_INSN_DELETED) (insn 9 8 10 2 (set (reg/f:DI 62 [ D.1705 ]) (reg:DI 60)) pr52838.c:6 62 {*movdi_internal_rex64} (expr_list:REG_DEAD (reg:DI 60) (nil))) But, but ... high 32 bits are not cleared anymore! Confirmed as a rtl optimization issue, adding CCs for their opinion.