> > Note I think Andrews comment#7 in the PR is spot-on then, the issue > isn't the bitfield inserts but the compare where combine elides > the sign_extend in favor of a subreg. That's likely some wrongdoing > in simplify-rtx in the context of WORD_REGISTER_OPERATIONS. >
Yes. There are 2 problems here. Any one of them can make this problem. 1) jump_insn eats sign_extend (and truncate) in /* Simplify X, an IF_THEN_ELSE expression. Return the new expression. */ static rtx simplify_if_then_else (rtx x) 2) MIPS claims sign_extend to be deleted. (define_insn_and_split "extendsidi2" [(set (match_operand:DI 0 "register_operand" "=d,l,d") (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "0,0,m")))] "TARGET_64BIT" "@ # # lw\t%0,%1" "&& reload_completed && register_operand (operands[1], VOIDmode)" [(const_int 0)] { emit_note (NOTE_INSN_DELETED); DONE; } [(set_attr "move_type" "move,move,load") (set_attr "mode" "DI")]) -- YunQiang Su