diff options
author | Peter Bergner <bergner@vnet.ibm.com> | 2012-04-11 06:51:50 -0500 |
---|---|---|
committer | Peter Bergner <bergner@gcc.gnu.org> | 2012-04-11 06:51:50 -0500 |
commit | 7bc14a04f26551b74ab89b56ae9cb37a3216baca (patch) | |
tree | 6e7eefc3eddd1af4ac56297fa67f1bdc9071dae9 /gcc/stmt.c | |
parent | 8c2a3f3b6cc7bc38af483ac4923258d376f90954 (diff) | |
download | gcc-7bc14a04f26551b74ab89b56ae9cb37a3216baca.zip gcc-7bc14a04f26551b74ab89b56ae9cb37a3216baca.tar.gz gcc-7bc14a04f26551b74ab89b56ae9cb37a3216baca.tar.bz2 |
re PR target/16458 (PowerPC - redundant compare)
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.
Co-Authored-By: Michael Matz <matz@suse.de>
From-SVN: r186312
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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: |