diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-12-18 04:24:06 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2003-12-18 04:24:06 +0000 |
commit | 5da1fd3dc2a76aede33fed347d9a6bdca4a378ed (patch) | |
tree | 562b0eeffdc5e1821b97da6f49323083b09b9dfd /gcc/config/frv | |
parent | 4ac8340c316fb9f22630f419498847e0c6baf2cb (diff) | |
download | gcc-5da1fd3dc2a76aede33fed347d9a6bdca4a378ed.zip gcc-5da1fd3dc2a76aede33fed347d9a6bdca4a378ed.tar.gz gcc-5da1fd3dc2a76aede33fed347d9a6bdca4a378ed.tar.bz2 |
frv.c (frv_ifcvt_modify_insn): Don't leave alone scratch insns of the then branch that clobber regs needed by...
* config/frv/frv.c (frv_ifcvt_modify_insn): Don't leave alone
scratch insns of the then branch that clobber regs needed by the
else branch.
From-SVN: r74771
Diffstat (limited to 'gcc/config/frv')
-rw-r--r-- | gcc/config/frv/frv.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 8d36bc6..6ee41847 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -6942,7 +6942,7 @@ single_set_pattern (rtx pattern) insn cannot be converted to be executed conditionally. */ rtx -frv_ifcvt_modify_insn (ce_if_block_t *ce_info ATTRIBUTE_UNUSED, +frv_ifcvt_modify_insn (ce_if_block_t *ce_info, rtx pattern, rtx insn) { @@ -7068,7 +7068,16 @@ frv_ifcvt_modify_insn (ce_if_block_t *ce_info ATTRIBUTE_UNUSED, other registers. */ else if (frv_ifcvt.scratch_insns_bitmap && bitmap_bit_p (frv_ifcvt.scratch_insns_bitmap, - INSN_UID (insn))) + INSN_UID (insn)) + /* We must not unconditionally set a reg set used as + scratch in the THEN branch if the same reg is live + in the ELSE branch. */ + && REG_P (SET_DEST (set)) + && (! ce_info->else_bb + || BLOCK_FOR_INSN (insn) == ce_info->else_bb + || ! (REGNO_REG_SET_P + (ce_info->else_bb->global_live_at_start, + REGNO (SET_DEST (set)))))) pattern = set; else if (mode == QImode || mode == HImode || mode == SImode |