For ARM, gcc might generate cond_exec insns before shrink-wrapping. But DF_LR_BB_INFO (bb)->def does not include def info from cond_exec insns. So the check in function move_insn_for_shrink_wrap is not enough.
We'd check DF_LIVE_BB_INFO (bb)->gen.
Kyrill,
Please try the attached patch. If it works, I will send it for community review.
Root cause:
For ARM, gcc might generate cond_exec insns before shrink-wrapping. But DF_LR_BB_INFO (bb)->def does not include def info from cond_exec insns. So the check in function move_insn_ for_shrink_ wrap is not enough.
We'd check DF_LIVE_BB_INFO (bb)->gen.
Kyrill,
Please try the attached patch. If it works, I will send it for community review.
Thanks!
-Zhenqiang