aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-11-02 14:30:39 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2009-11-02 14:30:39 +0000
commitd7c0c068dd5d174f5183c2187499332198aea683 (patch)
treef4baec2a8f727693a22c86047fb07064f6e86319 /gcc/testsuite
parent2b93f88dc57229e8e6d8fd6a868d3f54f8e7b43e (diff)
downloadgcc-d7c0c068dd5d174f5183c2187499332198aea683.zip
gcc-d7c0c068dd5d174f5183c2187499332198aea683.tar.gz
gcc-d7c0c068dd5d174f5183c2187499332198aea683.tar.bz2
re PR tree-optimization/41857 (Loop optimizer breaks __ea pointers with -mea64)
gcc/ PR tree-optimization/41857 * tree-flow.h (rewrite_use_address): Add BASE_HINT argument. * tree-ssa-loop-ivopts.c (rewrite_use_address): Pass base hint to create_mem_ref. * tree-ssa-address.c (move_hint_to_base): New function. (most_expensive_mult_to_index): Add TYPE argument. Use mode and address space associated with TYPE. (addr_to_parts): Add TYPE and BASE_HINT arguments. Pass TYPE to most_expensive_mult_to_index. Call move_hint_to_base. (create_mem_ref): Add BASE_HINT argument. Pass BASE_HINT and TYPE to addr_to_parts. gcc/testsuite/ PR tree-optimization/41857 * gcc.target/spu/ea/pr41857.c: New file. From-SVN: r153810
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/spu/ea/pr41857.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4fe2079..2d1378a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ PR tree-optimization/41857
+ * gcc.target/spu/ea/pr41857.c: New file.
+
2009-11-02 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41750
diff --git a/gcc/testsuite/gcc.target/spu/ea/pr41857.c b/gcc/testsuite/gcc.target/spu/ea/pr41857.c
new file mode 100644
index 0000000..1771067
--- /dev/null
+++ b/gcc/testsuite/gcc.target/spu/ea/pr41857.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your option)
+ any later version.
+
+ This file is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this file; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+/* { dg-do compile } */
+
+__ea char *strchr_ea (__ea const char *s, int c);
+__ea char *foo (__ea char *s)
+{
+ __ea char *ret = s;
+ int i;
+
+ for (i = 0; i < 3; i++)
+ ret = strchr_ea (ret, s[i]);
+
+ return ret;
+}