summaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-19 14:42:17 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-19 14:42:17 +0000
commite2de980eecb57e6891f77bd74a8272208bef1ace (patch)
tree78ff2fa79db3827d5cfd641d055766a3bbc93414 /gcc/cfgrtl.c
parenta3ac714726d1bc20c2e0385f01ca227d74af95c9 (diff)
downloadgcc-e2de980eecb57e6891f77bd74a8272208bef1ace.tar.gz
PR middle-end/23199
* cfgrtl.c (safe_insert_insn_on_edge): Use can_copy_p to detect whether registers live on the edge can be saved/restored. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 00a219d4802..f49eceb1657 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1456,16 +1456,9 @@ safe_insert_insn_on_edge (rtx insn, edge e)
regset killed;
rtx save_regs = NULL_RTX;
unsigned regno;
- int noccmode;
enum machine_mode mode;
reg_set_iterator rsi;
-#ifdef AVOID_CCMODE_COPIES
- noccmode = true;
-#else
- noccmode = false;
-#endif
-
killed = ALLOC_REG_SET (&reg_obstack);
for (x = insn; x; x = NEXT_INSN (x))
@@ -1491,7 +1484,8 @@ safe_insert_insn_on_edge (rtx insn, edge e)
if (mode == VOIDmode)
return false;
- if (noccmode && mode == CCmode)
+ /* Avoid copying in CCmode if we can't. */
+ if (!can_copy_p (mode))
return false;
save_regs = alloc_EXPR_LIST (0,