http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54157
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-01 21:47:59 UTC --- make_extraction in combine generates: 7474 inner = force_to_mode (inner, wanted_inner_mode, 7475 pos_rtx 7476 || len + orig_pos >= HOST_BITS_PER_WIDE_INT 7477 ? ~(unsigned HOST_WIDE_INT) 0 7478 : ((((unsigned HOST_WIDE_INT) 1 << len) - 1) (gdb) call debug_rtx (inner) (plus:SI (reg:SI 109 [ D.1765 ]) (const:SI (plus:SI (symbol_ref:SI ("tmp2") <var_decl 0x7ffff0f06140 tmp2>) (const_int 99452 [0x1847c])))) (gdb) p wanted_inner_mode $2 = DImode (gdb) When combines see (and:SI (lshiftrt:SI (plus:SI (reg:SI 109 [ D.1765 ]) (const:SI (plus:SI (symbol_ref:SI ("tmp2") <var_decl 0x7ffff0f06140 tmp2>) (const_int 99452 [0x1847c])))) (const_int 2 [0x2])) (const_int 3 [0x3])) (gdb) it calls make_extraction: if (! in_dest && unsignedp && mode_for_extraction (EP_extzv, -1) != MAX_MACHINE_MODE) { wanted_inner_reg_mode = mode_for_extraction (EP_extzv, 1); pos_mode = mode_for_extraction (EP_extzv, 3); extraction_mode = mode_for_extraction (EP_extzv, 0); } mode_for_extraction: /* Everyone who uses this function used to follow it with if (result == VOIDmode) result = word_mode; */ if (data->operand[opno].mode == VOIDmode) return word_mode; and i386.md: (define_expand "extzv" [(set (match_operand:SI 0 "register_operand") (zero_extract:SI (match_operand 1 "ext_register_operand") (match_operand:SI 2 "const8_operand") (match_operand:SI 3 "const8_operand")))] ""