From: Kyrylo Tkachov Date: Thu, 29 Jan 2015 13:36:22 +0000 (+0000) Subject: [ARM][cleanup] Simplify some expressions in some epilogue-related functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16277100d305948fa6d6fb5a4a318d9728c2400f;p=gcc.git [ARM][cleanup] Simplify some expressions in some epilogue-related functions * config/arm/arm.c (arm_emit_multi_reg_pop): Simplify definition of return_in_pc. Remove redundant assignments. (thumb2_emit_ldrd_pop): Simplify definition of return_in_pc. (arm_expand_epilogue): Don't compare boolean with true in if condition. From-SVN: r220246 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1caedf2c866..97316fa9634 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-01-29 Kyrylo Tkachov + + * config/arm/arm.c (arm_emit_multi_reg_pop): Simplify definition of + return_in_pc. Remove redundant assignments. + (thumb2_emit_ldrd_pop): Simplify definition of return_in_pc. + (arm_expand_epilogue): Don't compare boolean with true in if condition. + 2015-01-29 Uros Bizjak * config/i386/i386.c (ix86_mode_after): Make static. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index c9701b7a435..246298a8724 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -20273,11 +20273,10 @@ arm_emit_multi_reg_pop (unsigned long saved_regs_mask) rtx par; rtx dwarf = NULL_RTX; rtx tmp, reg; - bool return_in_pc; + bool return_in_pc = saved_regs_mask & (1 << PC_REGNUM); int offset_adj; int emit_update; - return_in_pc = (saved_regs_mask & (1 << PC_REGNUM)) ? true : false; offset_adj = return_in_pc ? 1 : 0; for (i = 0; i <= LAST_ARM_REGNUM; i++) if (saved_regs_mask & (1 << i)) @@ -20293,10 +20292,7 @@ arm_emit_multi_reg_pop (unsigned long saved_regs_mask) par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (num_regs + emit_update + offset_adj)); if (return_in_pc) - { - tmp = ret_rtx; - XVECEXP (par, 0, 0) = tmp; - } + XVECEXP (par, 0, 0) = ret_rtx; if (emit_update) { @@ -20446,9 +20442,8 @@ thumb2_emit_ldrd_pop (unsigned long saved_regs_mask) rtx par = NULL_RTX; rtx dwarf = NULL_RTX; rtx tmp, reg, tmp1; - bool return_in_pc; + bool return_in_pc = saved_regs_mask & (1 << PC_REGNUM); - return_in_pc = (saved_regs_mask & (1 << PC_REGNUM)) ? true : false; for (i = 0; i <= LAST_ARM_REGNUM; i++) if (saved_regs_mask & (1 << i)) num_regs++; @@ -25230,7 +25225,7 @@ arm_expand_epilogue (bool really_return) arm_emit_multi_reg_pop (saved_regs_mask); } - if (return_in_pc == true) + if (return_in_pc) return; }