summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorbergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-11 11:51:50 +0000
committerbergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-11 11:51:50 +0000
commit0a98b6d91809680c2b3201568beb8aeb00e5ed76 (patch)
tree6e7eefc3eddd1af4ac56297fa67f1bdc9071dae9 /gcc/stmt.c
parent51bc6b40dfbccc941dc5dd36608b84e6460ef8b6 (diff)
downloadgcc-0a98b6d91809680c2b3201568beb8aeb00e5ed76.tar.gz
gcc/
PR target/16458 * rtlanal.c (unsigned_reg_p): New function. Update copyright notice dates. * rtl.h (unsigned_reg_p): Prototype it. Update copyright notice dates. * config/rs6000/rs6000.c (rs6000_generate_compare): Use it. Update comment. * expr.c (expand_expr_real_1): Set register attributes. * stmt.c (expand_case): Likewise. gcc/testsuite/ PR target/16458 * gcc.target/powerpc/pr16458-1.c: New test. * gcc.target/powerpc/pr16458-2.c: Likewise. * gcc.target/powerpc/pr16458-3.c: Likewise. * gcc.target/powerpc/pr16458-4.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186312 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 0589bfd1bb8..7aabdc2caa6 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2285,7 +2285,11 @@ expand_case (gimple stmt)
do_pending_stack_adjust ();
if (MEM_P (index))
- index = copy_to_reg (index);
+ {
+ index = copy_to_reg (index);
+ if (TREE_CODE (index_expr) == SSA_NAME)
+ set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (index_expr), index);
+ }
/* We generate a binary decision tree to select the
appropriate target code. This is done as follows: