summaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-08 13:09:38 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-08 13:09:38 +0000
commit17c5f86d1d497cdd6031b7590fe1626e31c0ecdb (patch)
treef04b056a88255c575796a452750ba92f920e65c7 /gcc/ipa-split.c
parentcac1a11f3af3d104e1fe66763c9beda850a57b0e (diff)
downloadgcc-17c5f86d1d497cdd6031b7590fe1626e31c0ecdb.tar.gz
2011-09-08 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/50287 * ipa-split.c (split_function): Do not create SSA names for non-gimple-registers. * testsuite/gcc.dg/torture/pr50287.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178688 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index d5e5c69b5d8..b16cfb34a97 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -985,15 +985,20 @@ split_function (struct split_point *split_point)
bitmap_set_bit (args_to_skip, num);
else
{
- arg = gimple_default_def (cfun, parm);
- if (!arg)
+ /* This parm might not have been used up to now, but is going to be
+ used, hence register it. */
+ add_referenced_var (parm);
+ if (is_gimple_reg (parm))
{
- /* This parm wasn't used up to now, but is going to be used,
- hence register it. */
- add_referenced_var (parm);
- arg = make_ssa_name (parm, gimple_build_nop ());
- set_default_def (parm, arg);
+ arg = gimple_default_def (cfun, parm);
+ if (!arg)
+ {
+ arg = make_ssa_name (parm, gimple_build_nop ());
+ set_default_def (parm, arg);
+ }
}
+ else
+ arg = parm;
if (TYPE_MAIN_VARIANT (DECL_ARG_TYPE (parm))
!= TYPE_MAIN_VARIANT (TREE_TYPE (arg)))