For thumb mode, this is causing wrong size calculation and may affect some rtl pass, for example bb-order where copy_bb_p needs accurate insn length info. This have eventually part of the reason for https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00639.html where bb-order failed to do the bb copy. For the fix, I think we should extend arm_attr_length_push_multi to pop* pattern. OK for trunk? 2016-05-13 Jiong. Wang gcc/ PR target/71061 * config/arm/arm-protos.h (arm_attr_length_push_multi): Rename to "arm_attr_length_pp_multi". Add one parameter "first_index". * config/arm/arm.md (*push_multi): Use new function. (*load_multiple_with_writeback): Set "length" attribute. (*pop_multiple_with_writeback_and_return): Likewise. (*pop_multiple_with_return): Likewise.