summaryrefslogtreecommitdiff
path: root/gcc/mode-switching.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-13 16:59:37 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-13 16:59:37 +0000
commit3f988ca9ce81b431d97b5c245dbd601a391e9c75 (patch)
tree79b8e8a0b30c1b4dd3d038d8bc669a0031ea0dd6 /gcc/mode-switching.c
parent6262ff17c17973d0d91c843fc5993a00f96cfb9f (diff)
downloadgcc-3f988ca9ce81b431d97b5c245dbd601a391e9c75.tar.gz
PR target/41993
* mode-switching.c (create_pre_exit): Set return_copy to last_insn when copy_start is a function return regno instead of pseudo. Skip debug instructions in instruction scan loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193480 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mode-switching.c')
-rw-r--r--gcc/mode-switching.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 2072628805b..d607ad3122d 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -242,7 +242,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
int copy_start, copy_num;
int j;
- if (INSN_P (return_copy))
+ if (INSN_P (return_copy)
+ && !DEBUG_INSN_P (return_copy))
{
/* When using SJLJ exceptions, the call to the
unregister function is inserted between the
@@ -330,7 +331,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
short_block = 1;
break;
}
- if (copy_start >= FIRST_PSEUDO_REGISTER)
+ if (!targetm.calls.function_value_regno_p (copy_start))
{
last_insn = return_copy;
continue;